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
To confirm, is this a bug or intended behaviour? We have a lot of duplication between initSchema and our regular migrations because only one of them runs at any given time.
My database is clean, without any tables.
I want to InitSchema and do some other migrations, just like this:
However, the sql
INSERT INTO user (username) VALUES ('admin')
was not executed as expected.I then checked the source code of this library. There is only
insertMigration
in this place:gormigrate/gormigrate.go
Lines 347 to 351 in 293e5ee
Is
migration.Migrate(g.tx)
missing. Or should it be callg.runMigration(migration.ID)
instead ofg.insertMigration(migration.ID)
?The text was updated successfully, but these errors were encountered: