-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollback function not called automatically #76
Comments
According to this test: Line 353 in dacf763
The flag The rollback function isn't used at all if not called by |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi everybody,
Rollback isn't executed when an error occured in the migration script. The issue have been raised in #42 but the solution provided isn't working as expected because RollbackLast only rollback the last succeed migration, not the last that have failed :( .
Dependencies
gorm.io (so v2) version: v1.21.12
go migrate version: v2.0.0
postgresql 12
go version: 1.16
Migrations
Execute Migrate
Actual
The migration function is called, fails because the
todos
table doesn't exist and the rollback function isn't called.Note: Logs have been wrapped with logrus
Expectations
The first
ALTER TABLE
will fail because the table doesn't exists and then Rollback function must be called.Anybody have a clue ?
Thanks !
The text was updated successfully, but these errors were encountered: