|
| 1 | +# Generated by Django 2.2.24 on 2021-08-31 11:18 |
| 2 | + |
| 3 | +from django.conf import settings |
| 4 | +from django.db import migrations, models |
| 5 | +import django.db.models.deletion |
| 6 | +import django.utils.timezone |
| 7 | +import model_utils.fields |
| 8 | +import simple_history.models |
| 9 | + |
| 10 | + |
| 11 | +class Migration(migrations.Migration): |
| 12 | + |
| 13 | + dependencies = [ |
| 14 | + ('lti_consumer', '0012_rename_courseeditltifieldsenabledflag_model'), |
| 15 | + migrations.swappable_dependency(settings.AUTH_USER_MODEL), |
| 16 | + ('discussions', '0003_alter_provider_filter_list'), |
| 17 | + ] |
| 18 | + |
| 19 | + operations = [ |
| 20 | + migrations.CreateModel( |
| 21 | + name='ProgramDiscussionsConfiguration', |
| 22 | + fields=[ |
| 23 | + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), |
| 24 | + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), |
| 25 | + ('program_uuid', models.CharField(db_index=True, max_length=50, primary_key=True, serialize=False, verbose_name='Program UUID')), |
| 26 | + ('enabled', models.BooleanField(default=True, help_text='If disabled, the discussions in the associated program will be disabled.')), |
| 27 | + ('provider_type', models.CharField(help_text="The discussion provider's id", max_length=50, verbose_name='Discussion provider')), |
| 28 | + ('lti_configuration', models.ForeignKey(blank=True, help_text='The LTI configuration data for this program/provider.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='lti_consumer.LtiConfiguration')), |
| 29 | + ], |
| 30 | + options={ |
| 31 | + 'abstract': False, |
| 32 | + }, |
| 33 | + ), |
| 34 | + migrations.CreateModel( |
| 35 | + name='HistoricalProgramDiscussionsConfiguration', |
| 36 | + fields=[ |
| 37 | + ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), |
| 38 | + ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), |
| 39 | + ('program_uuid', models.CharField(db_index=True, max_length=50, verbose_name='Program UUID')), |
| 40 | + ('enabled', models.BooleanField(default=True, help_text='If disabled, the discussions in the associated program will be disabled.')), |
| 41 | + ('provider_type', models.CharField(help_text="The discussion provider's id", max_length=50, verbose_name='Discussion provider')), |
| 42 | + ('history_id', models.AutoField(primary_key=True, serialize=False)), |
| 43 | + ('history_date', models.DateTimeField()), |
| 44 | + ('history_change_reason', models.CharField(max_length=100, null=True)), |
| 45 | + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), |
| 46 | + ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), |
| 47 | + ('lti_configuration', models.ForeignKey(blank=True, db_constraint=False, help_text='The LTI configuration data for this program/provider.', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='lti_consumer.LtiConfiguration')), |
| 48 | + ], |
| 49 | + options={ |
| 50 | + 'verbose_name': 'historical program discussions configuration', |
| 51 | + 'ordering': ('-history_date', '-history_id'), |
| 52 | + 'get_latest_by': 'history_date', |
| 53 | + }, |
| 54 | + bases=(simple_history.models.HistoricalChanges, models.Model), |
| 55 | + ), |
| 56 | + ] |
0 commit comments