Closed TmLev closed 2 years ago
I have 9 migrations (000001 ... 000009) and I need to execute down migrations with ids 000002 and 000006 and only them.
Is this possible via migrate.Exec?
migrate.Exec
Passing just these two migrations results in an error:
Unable to create migration plan because of 000001_<...>.sql: unknown migration in database
Passing all migrations and removing .Up from the good ones results in empty gorp_migrations table, which is strange.
.Up
gorp_migrations
Okay, it is possible, but you need to use migrate.SetIgnoreUnknown(true).
migrate.SetIgnoreUnknown(true)
I have 9 migrations (000001 ... 000009) and I need to execute down migrations with ids 000002 and 000006 and only them.
Is this possible via
migrate.Exec
?Passing just these two migrations results in an error:
Passing all migrations and removing
.Up
from the good ones results in emptygorp_migrations
table, which is strange.