Skip to content

DB Migrations Test Procedue

Brandon Stull edited this page May 10, 2024 · 6 revisions

Notes

  • log_activity is MyISAM, rest are InnoDB
  • ForeignKeys to Django User model without copying over from old first will fail.

DB Migrations test procedure

  • Start from a completely empty database
  • Import materia_qa_full.sql via SequelAce
  • Migrate everything except core and fake the initial core migration, change log_activity engine from MyISAM to InnoDB, add id columns to tables that previously lacked primary keys, and remove the user_meta table's compound primary key:
    • ./run.sh python manage.py fake_current_db
  • Run the copy users to Django migration
    • ./run.sh python manage.py migrate core 0002
    • ./run.sh python manage.py showmigrations (confirm core migrated to 0002)
  • Run the rest of the migrations
    • ./run.sh python manage.py migrate core
Clone this wiki locally