Skip to content

What am I supposed to do if I remove a column from a table? How to handle this with the migrator? #2026

Answered by simolus3
madsane29 asked this question in Q&A
Discussion options

You must be logged in to vote

Would the app crash if I simply remove from the entity class?

If the column has been nullable before, I don't think this is particularly risky. Drift won't crash when reading a row with additional columns from the database. And since the column is nullable, there shouldn't be any issues inserting the column either.

That said, you can run a simple migration to delete the column from the database as well.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by madsane29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants