|
| 1 | +# Generated by Django 2.2.24 on 2022-01-28 19:06 |
| 2 | + |
| 3 | +from django.db import migrations, models |
| 4 | +import django.db.models.deletion |
| 5 | +import sponsors.models.benefits |
| 6 | + |
| 7 | + |
| 8 | +class Migration(migrations.Migration): |
| 9 | + |
| 10 | + dependencies = [ |
| 11 | + ('sponsors', '0072_auto_20220125_2005'), |
| 12 | + ] |
| 13 | + |
| 14 | + operations = [ |
| 15 | + migrations.CreateModel( |
| 16 | + name='RequiredResponseAsset', |
| 17 | + fields=[ |
| 18 | + ('benefitfeature_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='sponsors.BenefitFeature')), |
| 19 | + ('related_to', models.CharField(choices=[('sponsor', 'Sponsor'), ('sponsorship', 'Sponsorship')], help_text='To which instance (Sponsor or Sponsorship) should this asset relate to.', max_length=30, verbose_name='Related To')), |
| 20 | + ('internal_name', models.CharField(db_index=True, help_text='Unique name used internally to control if the sponsor/sponsorship already has the asset', max_length=128, verbose_name='Internal Name')), |
| 21 | + ('label', models.CharField(help_text="What's the title used to display the input to the sponsor?", max_length=256)), |
| 22 | + ('help_text', models.CharField(blank=True, default='', help_text='Any helper comment on how the input should be populated', max_length=256)), |
| 23 | + ('due_date', models.DateField(blank=True, default=None, null=True)), |
| 24 | + ], |
| 25 | + options={ |
| 26 | + 'verbose_name': 'Require Response', |
| 27 | + 'verbose_name_plural': 'Required Responses', |
| 28 | + 'abstract': False, |
| 29 | + 'base_manager_name': 'objects', |
| 30 | + }, |
| 31 | + bases=(sponsors.models.benefits.RequiredAssetMixin, 'sponsors.benefitfeature', models.Model), |
| 32 | + ), |
| 33 | + migrations.CreateModel( |
| 34 | + name='RequiredResponseAssetConfiguration', |
| 35 | + fields=[ |
| 36 | + ('benefitfeatureconfiguration_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='sponsors.BenefitFeatureConfiguration')), |
| 37 | + ('related_to', models.CharField(choices=[('sponsor', 'Sponsor'), ('sponsorship', 'Sponsorship')], help_text='To which instance (Sponsor or Sponsorship) should this asset relate to.', max_length=30, verbose_name='Related To')), |
| 38 | + ('internal_name', models.CharField(db_index=True, help_text='Unique name used internally to control if the sponsor/sponsorship already has the asset', max_length=128, verbose_name='Internal Name')), |
| 39 | + ('label', models.CharField(help_text="What's the title used to display the input to the sponsor?", max_length=256)), |
| 40 | + ('help_text', models.CharField(blank=True, default='', help_text='Any helper comment on how the input should be populated', max_length=256)), |
| 41 | + ('due_date', models.DateField(blank=True, default=None, null=True)), |
| 42 | + ], |
| 43 | + options={ |
| 44 | + 'verbose_name': 'Require Response Configuration', |
| 45 | + 'verbose_name_plural': 'Require Response Configurations', |
| 46 | + 'abstract': False, |
| 47 | + 'base_manager_name': 'objects', |
| 48 | + }, |
| 49 | + bases=(sponsors.models.benefits.AssetConfigurationMixin, 'sponsors.benefitfeatureconfiguration', models.Model), |
| 50 | + ), |
| 51 | + migrations.CreateModel( |
| 52 | + name='ResponseAsset', |
| 53 | + fields=[ |
| 54 | + ('genericasset_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='sponsors.GenericAsset')), |
| 55 | + ('response', models.CharField(choices=[('YES', 'Yes'), ('NO', 'No')], max_length=32, null=True)), |
| 56 | + ], |
| 57 | + options={ |
| 58 | + 'verbose_name': 'Response Asset', |
| 59 | + 'verbose_name_plural': 'Response Assets', |
| 60 | + }, |
| 61 | + bases=('sponsors.genericasset',), |
| 62 | + ), |
| 63 | + migrations.AddConstraint( |
| 64 | + model_name='requiredresponseassetconfiguration', |
| 65 | + constraint=models.UniqueConstraint(fields=('internal_name',), name='uniq_response_asset_cfg'), |
| 66 | + ), |
| 67 | + ] |
0 commit comments