-
Notifications
You must be signed in to change notification settings - Fork 9
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
#788 Fix database migrations issue wherein running 'flask db migrate' produces a lot of unexpected output #853
base: main
Are you sure you want to change the base?
Conversation
Identified the unexpected outputs and spoke to @k-macmillan about this and he pointed me in the right direction.
|
there are about 51 f keys affected. I'm working on the list for discussion. |
|
Here are list of tables that will be affected by per command:
|
|
@k-macmillan I found the new things while I am working on fixing
I tried to search git blames/history in notification-api but couldn't find out any of related things. But I realized this database is also used in notification-portal and there was a user model defining |
The revision reduced from the 651 lines commands to 7 commands as above when we use the standalone database for |
@k-macmillan As you can see above revision, there is table |
I just fix migrations without removing the table, and I couldn’t find where the data was been submitted from on the services_history table. |
completed |
@ianperera I'm late in seeing your question. Sorry about that. I think this is a consequence of the Versioned mixin. |
Just for context: flask |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comments I've made so far apply more generally to other changes. The contents of models.py should reflect what is correct for the desired behavior of the app and what the database should codify. Changing models.py solely to eliminate unexpected migration output is not the right answer.
@kalbfled I have reverted the changes based on your inputs. There are some comments in this PR that @k-macmillan asked and those changed made by you. Can you please give me some ideas about your changes? I appreciate your inputs, I learned much from your feedback. |
Issue
This was originally vanotify-team issue 224.
#788
Checklist for db migration commands.