Dev: Add initial migration and Running migration instruction to README #1133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Initiate migration script and add running migration script to README
Fixes #996
Type of Change:
Code/Quality Assurance Only
How Has This Been Tested?
Confirmed that alembic version was added to the local db and the initial version was created under
migrations > versions
folderbefore running initial migration
after running initial migration
The local db will be updated one version at a time accordingly
from initial to second revision
from second to third revision
Example case: User table
Changes:
name
tofull_name
IMPORTANT Noticed that the auto-generated alembic script IS NOT CORRECT!!.
You MUST MODIFY the script to reflect the intended schema changes. Once you're done, you can run
flask db upgrade
before alteration
After alteration (with data successfully preserved)
Checklist:
Code/Quality Assurance Only
ADDITIONAL NOTE
NA