fix: Creates a squashed migration for xblock_config that removes moved model
A previous PR moved the CourseEditLTIFieldsEnabledFlag model to the LTI consumer XBlock's repo. The migrations in the XBlock repo check if the model already exists, and if so, it will avoid creating the model. However, it seems that in some cases the LTI consumer XBlock's migrations run first, creating the model and causing the edx-platform migrations to fail due to a pre-existing table since no such check is performed in the migrations in edx-platform. Since the only migrations that exist for this model are one that creates it and another that deletes it, this change creates a squashed miration that just skips creating the model since for new installs the LTI Consumer XBlock should handle it.
This commit is contained in:
committed by
Awais Jibran
parent
109037d05b
commit
8fd3ff706d
@@ -0,0 +1,34 @@
|
||||
# Generated by Django 2.2.24 on 2021-06-29 09:29
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import opaque_keys.edx.django.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
replaces = [('xblock_config', '0001_initial'), ('xblock_config', '0002_courseeditltifieldsenabledflag'), ('xblock_config', '0003_move_course_edit_lti_fields_enabled_flag_model_to_lti_consumer')]
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='StudioConfig',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
|
||||
('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
|
||||
('disabled_blocks', models.TextField(default='about course_info static_tab', help_text='Space-separated list of XBlocks on which XBlockAsides should never render in studio')),
|
||||
('changed_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Changed by')),
|
||||
],
|
||||
options={
|
||||
'ordering': ('-change_date',),
|
||||
'abstract': False,
|
||||
},
|
||||
)
|
||||
]
|
||||
Reference in New Issue
Block a user