Commit a59ac922 by Feanil Patel

Merge pull request #2031 from edx/feanil/reorder_migrations

If you run syncdb you want to run it before you run migrate.
parents 7682c12d b9f43d78
...@@ -6,25 +6,25 @@ ...@@ -6,25 +6,25 @@
db_dry_run: "--db-dry-run" db_dry_run: "--db-dry-run"
syncdb: false syncdb: false
tasks: tasks:
# Syncdb with migrate when the migrate user is overridden in extra vars - name: syncdb
- name: migrate
shell: > shell: >
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
python manage.py {{ item }} migrate --noinput {{ db_dry_run }} --settings=aws_migrate python manage.py {{ item }} syncdb --noinput --settings=aws_migrate
environment: environment:
DB_MIGRATION_USER: "{{ COMMON_MYSQL_MIGRATE_USER }}" DB_MIGRATION_USER: "{{ COMMON_MYSQL_MIGRATE_USER }}"
DB_MIGRATION_PASS: "{{ COMMON_MYSQL_MIGRATE_PASS }}" DB_MIGRATION_PASS: "{{ COMMON_MYSQL_MIGRATE_PASS }}"
when: syncdb
with_items: with_items:
- lms - lms
- cms - cms
- name: syncdb # Syncdb with migrate when the migrate user is overridden in extra vars
- name: migrate
shell: > shell: >
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
python manage.py {{ item }} syncdb --noinput --settings=aws_migrate python manage.py {{ item }} migrate --noinput {{ db_dry_run }} --settings=aws_migrate
environment: environment:
DB_MIGRATION_USER: "{{ COMMON_MYSQL_MIGRATE_USER }}" DB_MIGRATION_USER: "{{ COMMON_MYSQL_MIGRATE_USER }}"
DB_MIGRATION_PASS: "{{ COMMON_MYSQL_MIGRATE_PASS }}" DB_MIGRATION_PASS: "{{ COMMON_MYSQL_MIGRATE_PASS }}"
when: syncdb
with_items: with_items:
- lms - lms
- cms - cms
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment