-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #509 from dbca-wa/xzzy-patch-10
Create migration_steps.md
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
Step 1: Create new database. | ||
|
||
#Mooring Licensing Migration (DEV) | ||
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; | ||
\c mooringlicensing_mig_dev | ||
create extension postgis; | ||
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 | ||
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 | ||
|
||
./manage_ml.py migrate auth | ||
./manage_ml.py migrate ledger_api_client | ||
./manage_ml.py migrate admin | ||
./manage_ml.py migrate django_cron | ||
./manage_ml.py migrate sites | ||
./manage_ml.py migrate sessions | ||
./manage_ml.py migrate | ||
|
||
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 | ||
python ./manage_ml.py ml_migration_script --path ~/datamigration/outpath04122024/ >> ~/datamigration/outpath04122024/migration_run_08012024.log 2>&1 |