Skip to content

Commit

Permalink
Update migration_steps.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xzzy authored Jan 8, 2025
1 parent 3364a0d commit 90c16b0
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions migration_steps.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

Step 1: Create new database.

#Mooring Licensing Migration (DEV)
## Step 1: Create new database.
CREATE DATABASE mooringlicensing_mig_dev;
CREATE USER mooringlicensing_mig_dev WITH PASSWORD '<password>';
GRANT ALL PRIVILEGES ON DATABASE "mooringlicensing_mig_dev" to mooringlicensing_mig_dev;
Expand All @@ -11,13 +9,11 @@ GRANT ALL ON ALL TABLES IN SCHEMA public TO mooringlicensing_mig_dev;
GRANT ALL ON SCHEMA public TO mooringlicensing_mig_dev;


Step 2: apply patches
## Step 2: apply patches
vi venv/lib/python3.12/site-packages/django/contrib/admin/migrations/0001_initial.py (see changes in patch_for_admin_0001_initial.patch)

vi venv/lib/python3.12/site-packages/reversion/migrations/0001_squashed_0004_auto_20160611_1202.py (see changes in patch_for_reversion_0001.patch)

Step 3: Run Migrations

## Step 3: Run Migrations
./manage_ml.py migrate auth
./manage_ml.py migrate ledger_api_client
./manage_ml.py migrate admin
Expand All @@ -26,11 +22,11 @@ Step 3: Run Migrations
./manage_ml.py migrate sessions
./manage_ml.py migrate

Step 4 Apply Fixutures
## Step 4 Apply Fixutures
./manage_ml.py loaddata mooringlicensing/fixtures/mooring_mooring_bay.json

./manage_ml.py loaddata mooringlicensing/fixtures/ml_fixtures.json


Step 5 run migrations script
## Step 5 run migrations script
python ./manage_ml.py ml_migration_script --path ~/datamigration/outpath04122024/ >> ~/datamigration/outpath04122024/migration_run_08012024.log 2>&1

0 comments on commit 90c16b0

Please sign in to comment.