Wrong database scheme at mysql goose migrations-scripts
- Dominant language
- Go
- Stars
- 9.5k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
When I'm trying to create a new database scheme on my mysql database using goose with the mysql backend I'm geeting these error message:
/opt/cfssl/bin/goose -path /opt/cfssl/src/github.com/cloudflare/cfssl/certdb/mysql up
goose: migrating db environment 'development', current version: 0, target: 1
2016/07/28 18:08:03 FAIL 001_CreateCertificates.sql (Error 1067: Invalid default value for 'expiry'), quitting migration.
Fixing this in /certdb/mysql/migrations/001_CreateCertificates.sql by myself to another default value, I was able to create both tables.
But when using this db-scheme to generate new certificates I'm running into other problem with this scheme:
{"success":false,"result":null,"errors":[{"code":11000,"message":"Error 1406: Data too long for column 'serial_number' at row 1"}],"messages":[]}
Fixing this to a higher varbinary value in this scheme lead to another error:
"Error 1292: Incorrect datetime value: '0000-00-00' for column 'revoked_at' at row 1"
So it seems, that this scheme is completely wrong. Can anyone provide me please the correct mysql database scheme for certdb?
And for all others it would be nice fixing this in this github repository.
thanks in advance!
Contributor guide
Assessment
This issue has not been assessed yet.