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
Imagine you have a set of migrations. Let's say the last migration you performed was number 148. Now, you decided to add a new migration using a timestamp-based version such as 20231010072528. When you up the migration it is working perfectly.
Here's the issue:
When you want to "down" a migration, you'd expect to go back to the previous version, which should be 148 in this case. However, what's happening currently is that instead of going back to 148, the system is subtracting 1 from 20231010072528 and taking you to 20231010072527. This behavior doesn't match the expectations.
migrations.Run() function should return the correct previous version, which in this case should be 148, rather than the unexpected 20231010072527.
Note: Migration is getting down as expected but version number is not correct.
@vmihailenco, need your input on this issue.
Imagine you have a set of migrations. Let's say the last migration you performed was number 148. Now, you decided to add a new migration using a timestamp-based version such as 20231010072528. When you up the migration it is working perfectly.
Here's the issue:
When you want to "down" a migration, you'd expect to go back to the previous version, which should be 148 in this case. However, what's happening currently is that instead of going back to 148, the system is subtracting 1 from 20231010072528 and taking you to 20231010072527. This behavior doesn't match the expectations.
migrations.Run()
function should return the correct previous version, which in this case should be 148, rather than the unexpected 20231010072527.Note: Migration is getting down as expected but version number is not correct.
Code sample which reproduces the issue:
go-pg-migration-issue.zip
The text was updated successfully, but these errors were encountered: