Currently, I have an Unversioned Schema, and lightweight changes are automatically applied to the Models.
However, I'm planning to transition to a VersionedSchema, and I have a few questions:
-
Do I need to write all lightweight migrations in the Migration Plan? or is it automatically applied like the Unversioned Schema?
-
What happens if I do not create a lightweight migration? and just directly do lightweight changes to the latest VersionedSchema (example: Add a new property)?
I've experimented with it a bit and these are what I found out.
-
There are no automatic lightweight migrations, you have to write every changes to your model in the migration
-
If you do not create a lightweight migrations, your app will crash.
CONCLUSION:
If you have transitioned to a VersionedSchema, you now have to write every lchanges to your model in the migration or else your app will crash.