Adding the Gormigrate was simple enough. I've just stuck our entire previous migration code into migrations_old.go instead of trying to translate it to Gormigrate.
There was one major caveat: Gormigrate needed a higher version of GORM, which required updating the database drivers. The Sqlite database driver has a bug where it creates invalid SQL if the table name and column name is the same. Therefore I have renamed the database column token.token to token.value.
The response.Token is left untouched. The JSON response still uses a field named "token"
CHANGELOG.md
file, according to docs: https://iver-wharf.github.io/#/development/changelogs/writing-changelogsSummary
Motivation
Adding the Gormigrate was simple enough. I've just stuck our entire previous migration code into
migrations_old.go
instead of trying to translate it to Gormigrate.There was one major caveat: Gormigrate needed a higher version of GORM, which required updating the database drivers. The Sqlite database driver has a bug where it creates invalid SQL if the table name and column name is the same. Therefore I have renamed the database column
token.token
totoken.value
.The
response.Token
is left untouched. The JSON response still uses a field named"token"
Closes #135