-
Hi! I'm trying to set up migrations and a simple change in a column. Changed NOT NULL to nullable in the schema definition. I set up database step-by-step migration with
The problem comes after it, and I think I don't understand how this works.
First of all I had to pass
If I inspect the database it did run the migration just fine, but what bugs me is that error when I want to validate... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
Does this happen in the app or when you run the generated tests? |
Beta Was this translation helpful? Give feedback.
-
This is a good catch that hasn't occurred to me: Migration tests might instantiate the schema of your database to an older version of the schema, but But since this also happens when running the app, I suspect something else is going wrong too. It would be good to know whether the tests pass - if they do, it might be that only your existing app instance is in a bad state due to e.g. an incomplete migration after changing the schema as @dickermoshe said. |
Beta Was this translation helpful? Give feedback.
Okay this is kind of embarrassing.
All this trouble was because I hadn't run yet build_runner, so the .g files hadn't been updated.
Thank you so much for your time and patience!