-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update models to match alembic migrations #530
Conversation
…ic, it does not need to create one
After experimenting a bit with my suggested changes, we might actually want to apply the autogenerated changes that this PR is attempting to squash. Boolean columns should probably have non-null value. We may also want to update the encrypt/decrypt methods to return |
…w_in_directory are required. Also, make it so Message content always a string and required
Okay this is ready for another review! It includes a migration that just makes those boolean fields required. I briefly tried making the encrypt_field and decrypt_field functions always return a string, but that caused all sorts of problems. So instead I just made it so the Message.content setter stores a blank string if encrypt_fields returns None. |
This PR tweaks the models so that when you autogenerate a migration with alembic, it does not need to create a new one.
For example, from the
main
branch:Here's the migration it created:
However from this branch:
It no longer needs to autogenerate a migration.