You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug
The schema migrations table should contain a record for each migration ran, but it only ever contains a single record with the most recent migration version with MySQL.
Steps to Reproduce
Steps to reproduce the behavior:
Create two migration files, first 1_test.up.sql, run it with the migrate CLI command. Check the schema_migrations table, it will have a record for version=1. Create a second migration, 2_test.up.sql, run it with the same CLI command (e.g. migrate ... up 1), select * from schema_migrations and the record for version=1 is no longer there, only version=2. Docker image may or may not be a factor in reproducing.
Expected Behavior
I expect to see all migrations that have ran in the schema_migrations table, not just the most recent.
Looks like it's default behavior. We have the same issue with postgresql. It's relay not convenient with team 2 and more people. Looking for another tool for now(
Looks like it's default behavior. We have the same issue with postgresql. It's relay not convenient with team 2 and more people. Looking for another tool for now(
I thought this was a bug given that no other migration tools that I've used behave like this, and there is no documentation whatsoever on the behavior of the schema_migrations table that I could find.
Describe the Bug
The schema migrations table should contain a record for each migration ran, but it only ever contains a single record with the most recent migration version with MySQL.
Steps to Reproduce
Steps to reproduce the behavior:
Create two migration files, first
1_test.up.sql
, run it with the migrate CLI command. Check theschema_migrations
table, it will have a record forversion=1
. Create a second migration,2_test.up.sql
, run it with the same CLI command (e.g.migrate ... up 1
),select * from schema_migrations
and the record forversion=1
is no longer there, onlyversion=2
. Docker image may or may not be a factor in reproducing.Expected Behavior
I expect to see all migrations that have ran in the
schema_migrations
table, not just the most recent.Migrate Version
v4.11.0 (docker image)
Loaded Source Drivers
docker image
Loaded Database Drivers
mysql
Go Version
go1.13 linux/amd64
The text was updated successfully, but these errors were encountered: