Merge pull request #17094 from edx/revert-17030-douglashall/ENT-779_drop_existing_session_migration

Revert "ENT-779 Remove ProviderConfig.drop_existing_session field from DB."
This commit is contained in:
Douglas Hall
2018-01-04 14:30:55 -05:00
committed by GitHub
2 changed files with 7 additions and 27 deletions

View File

@@ -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',
),
]

View File

@@ -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)