From bc082aa1acf225a6bbe4ae90e782f874124b017b Mon Sep 17 00:00:00 2001 From: Kevin Falcone Date: Thu, 26 Jul 2018 14:04:43 -0400 Subject: [PATCH] Mark the interdependency between our code and DOT We need to drop the Foreign Keys, apply their two migrations and then re-add the Foreign Keys but Django gets to decide on the apply order and this helps ensure we get the one we want. --- .../migrations/0006_drop_application_id_constraints.py | 4 ++++ .../migrations/0007_restore_application_id_constraints.py | 1 + 2 files changed, 5 insertions(+) diff --git a/openedx/core/djangoapps/oauth_dispatch/migrations/0006_drop_application_id_constraints.py b/openedx/core/djangoapps/oauth_dispatch/migrations/0006_drop_application_id_constraints.py index 50148cf8b4..0738e0b264 100644 --- a/openedx/core/djangoapps/oauth_dispatch/migrations/0006_drop_application_id_constraints.py +++ b/openedx/core/djangoapps/oauth_dispatch/migrations/0006_drop_application_id_constraints.py @@ -13,6 +13,10 @@ class Migration(migrations.Migration): ('oauth_dispatch', '0005_applicationaccess_type'), ] + run_before = [ + ('oauth2_provider', '0005_auto_20170514_1141'), + ] + operations = [ migrations.AlterField( model_name='applicationaccess', diff --git a/openedx/core/djangoapps/oauth_dispatch/migrations/0007_restore_application_id_constraints.py b/openedx/core/djangoapps/oauth_dispatch/migrations/0007_restore_application_id_constraints.py index d5e2739ca2..8a2b93a63c 100644 --- a/openedx/core/djangoapps/oauth_dispatch/migrations/0007_restore_application_id_constraints.py +++ b/openedx/core/djangoapps/oauth_dispatch/migrations/0007_restore_application_id_constraints.py @@ -11,6 +11,7 @@ class Migration(migrations.Migration): dependencies = [ ('oauth_dispatch', '0006_drop_application_id_constraints'), + ('oauth2_provider', '0006_auto_20171214_2232'), ] operations = [