diff --git a/readthedocs/projects/migrations/0027_remove_json_with_html_feature.py b/readthedocs/projects/migrations/0027_remove_json_with_html_feature.py new file mode 100644 index 000000000..c5daf0ece --- /dev/null +++ b/readthedocs/projects/migrations/0027_remove_json_with_html_feature.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.13 on 2018-08-22 09:19 +from __future__ import unicode_literals + +from django.db import migrations + + +FEATURE_ID = 'build_json_artifacts_with_html' + + +def forward_add_feature(apps, schema_editor): + Feature = apps.get_model('projects', 'Feature') + try: + Feature.objects.get(feature_id=FEATURE_ID).delete() + except Feature.DoesNotExist: + pass + + +def reverse_add_feature(apps, schema_editor): + Feature = apps.get_model('projects', 'Feature') + Feature.objects.create(feature_id=FEATURE_ID) + + +class Migration(migrations.Migration): + + dependencies = [ + ('projects', '0026_ad-free-option'), + ] + + operations = [ + migrations.RunPython(forward_add_feature, reverse_add_feature), + ]