-
Notifications
You must be signed in to change notification settings - Fork 14
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
[MIGRATION][NMP#648] catchup on migrations #675
Conversation
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.
Nice!
@@ -46,6 +46,7 @@ public Startup(IWebHostEnvironment env) | |||
|
|||
if (env.IsDevelopment()) | |||
{ | |||
builder.AddJsonFile("secrets.json", optional: true, reloadOnChange: true); |
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.
This is the only real change in this file and it is unrelated to migrations. Adding this line worked as a fix for a hard-to-address local development issue (only one dev had the issue) but it does not seem to have any side effects for working builds.
All other changes in this file are linting
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.
Yes I think this is OK as we want to unblock you. I would create a ticket and maybe leave a TODO in the code to pull this out when you offboard from NMP.
Pull Request Standards
HOTFIX
,FEATURE
,etc
][NMP-###]
README
,functions
,team documents
]Description
When a new migration is created, a model snapshot is used to find all the model changes that do not yet have migration-associated changes. The last migration for NMP was in 2020. A new migration has been created (CatchupModelUpdate) that catches all the model updates that should have already had migrations associated with them.
SNAGS:
In my testing of migrations, the dev db was put into a suboptimal state. the migration history is inaccurate and likely irreconcilable. Currently, it is not possible to run new migrations on the dev db (at least not with the auto-generated migration code). This db will need to be restored to a working state
The production database does not have a record of running the last migration, but the results of that migration are present (the 'Depths' table). This might cause errors when rebuilding prod as the migration will run and it will try to add a table that already exists.
This PR includes the following proposed change(s):
-ALSO INCLUDED: a fix for an issue only affecting one dev. This fix explicitly adds the secret.json to the Configuration object when in a dev env.