Skip to content
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

Squash migrations using the "nuclear" option #634

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Andrew-Dickinson
Copy link
Member

Removed all existing migration code, and ran python src/manage.py makemigrations to create new ones from scratch

Copied over the manually written migration for the readonly database role

Closes #594

Procedure to roll out this change:

Everywhere that we have a DB, drop all the tables (super destructive option, make sure you have a backup first):

DROP SCHEMA public CASCADE;
CREATE SCHEMA public;

And run the new migrations

python src/manage.py migrate

Then to get the data back, import from a backup, run the import script, use scripts/import_spreadsheet_dump.sh, etc.

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.03%. Comparing base (3e0a0e3) to head (8c09599).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #634   +/-   ##
=======================================
  Coverage   94.03%   94.03%           
=======================================
  Files          75       75           
  Lines        3086     3086           
=======================================
  Hits         2902     2902           
  Misses        184      184           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@WillNilges WillNilges left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consolidate migrations into single file with thermonuclear option
3 participants