Replies: 1 comment 2 replies
-
If you've tried other devices, does this only happen on Windows? I'm not sure what could cause this at the moment, did you get any exception? Drift should update the schema version right after your migration ran. If you can consistently reproduce this, does it still happen if you add |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wrote migration code, and everything seems to have performed well. All necessary columns and tables were added and deleted, but the schema number didn't update.
In the database file, the schema number remains at 3, but in my code, it's already 5. So, schema 3 has all the fields that were supposed to be in schema 5. Whenever the app reruns, it conflicts because the migration tries to add already existing fields.
The only workaround that came to mind was to write logic that, if
from == 3
, deletes all "migrated" code that was supposed to be added at higher schemas and then re-performs the migration.What could cause the schema number not to update? And is there a better solution for my problem?
P.S.
I didn't perform the migration within a transaction.
The targeted device is Windows
Beta Was this translation helpful? Give feedback.
All reactions