Skip to content

Migration issues using Goose

Gut edited this page Feb 25, 2021 · 3 revisions

Regarding migration RFC, Gin-templates is using goose as a database migration tool. However, goose doesn't support migrate the older migration files.

For example

  • Developer A create migration 20212000000000_migration_a.sql on branch-a.
  • Developer B create migration 20211000000000_migration_b.sql on branch-b.
  • Developer A merge branch-a to develop branch and migration 20212000000000_migration_a.sql is MIGRATED by goose.
  • Developer B merge branch-b to develop branch and migration 20211000000000_migration_b.sql is IGNORED by goose.

From above scenario, you can see that the migration_b.sql is ignored because goose doesn't support migrate the older migration.

Current suggestion is make sure if your migration is in order with the destination branch. This validation will be added in the next release (for more information https://github.com/nimblehq/gin-templates/issues/29)

Clone this wiki locally