From 23e17b3c35d96853c35be17cf8589d885c1dc6b2 Mon Sep 17 00:00:00 2001 From: Douglas Hall Date: Thu, 4 Jan 2018 13:20:22 -0500 Subject: [PATCH] Revert "ENT-779 Remove ProviderConfig.drop_existing_session field from DB." --- .../migrations/0014_auto_20171222_1233.py | 26 ------------------- common/djangoapps/util/tests/test_db.py | 8 +++++- 2 files changed, 7 insertions(+), 27 deletions(-) delete mode 100644 common/djangoapps/third_party_auth/migrations/0014_auto_20171222_1233.py diff --git a/common/djangoapps/third_party_auth/migrations/0014_auto_20171222_1233.py b/common/djangoapps/third_party_auth/migrations/0014_auto_20171222_1233.py deleted file mode 100644 index f06a72d104..0000000000 --- a/common/djangoapps/third_party_auth/migrations/0014_auto_20171222_1233.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('third_party_auth', '0013_sync_learner_profile_data'), - ] - - operations = [ - migrations.RemoveField( - model_name='ltiproviderconfig', - name='drop_existing_session', - ), - migrations.RemoveField( - model_name='oauth2providerconfig', - name='drop_existing_session', - ), - migrations.RemoveField( - model_name='samlproviderconfig', - name='drop_existing_session', - ), - ] diff --git a/common/djangoapps/util/tests/test_db.py b/common/djangoapps/util/tests/test_db.py index 2509d22052..3a2ed47bb2 100644 --- a/common/djangoapps/util/tests/test_db.py +++ b/common/djangoapps/util/tests/test_db.py @@ -237,4 +237,10 @@ class MigrationTests(TestCase): out = StringIO() call_command('makemigrations', dry_run=True, verbosity=3, stdout=out) output = out.getvalue() - self.assertIn('No changes detected', output) + # Temporarily disable this check so we can remove + # the ProviderConfig.drop_existing_session field. + # We will restore this check once the code referencing + # this field has been deleted/released and a migration + # for field removal has been added. + if 'Remove field' not in output: + self.assertIn('No changes detected', output)