|
| 1 | +# Generated by Django 2.2.24 on 2022-01-11 20:55 |
| 2 | + |
| 3 | +from django.db import migrations, models |
| 4 | +import django.db.models.deletion |
| 5 | +import sponsors.models.assets |
| 6 | +import sponsors.models.benefits |
| 7 | + |
| 8 | + |
| 9 | +class Migration(migrations.Migration): |
| 10 | + |
| 11 | + dependencies = [ |
| 12 | + ('sponsors', '0069_auto_20220110_2148'), |
| 13 | + ] |
| 14 | + |
| 15 | + operations = [ |
| 16 | + migrations.CreateModel( |
| 17 | + name='FileAsset', |
| 18 | + fields=[ |
| 19 | + ('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')), |
| 20 | + ('file', models.FileField(null=True, upload_to=sponsors.models.assets.generic_asset_path)), |
| 21 | + ], |
| 22 | + options={ |
| 23 | + 'verbose_name': 'File Asset', |
| 24 | + 'verbose_name_plural': 'File Assets', |
| 25 | + }, |
| 26 | + bases=('sponsors.genericasset',), |
| 27 | + ), |
| 28 | + migrations.CreateModel( |
| 29 | + name='ProvidedFileAsset', |
| 30 | + fields=[ |
| 31 | + ('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')), |
| 32 | + ('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')), |
| 33 | + ('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')), |
| 34 | + ('shared', models.BooleanField(default=False)), |
| 35 | + ('label', models.CharField(help_text="What's the title used to display the file to the sponsor?", max_length=256)), |
| 36 | + ('help_text', models.CharField(blank=True, default='', help_text='Any helper comment on how the file should be used', max_length=256)), |
| 37 | + ('shared_file', models.FileField(blank=True, null=True, upload_to='')), |
| 38 | + ], |
| 39 | + options={ |
| 40 | + 'verbose_name': 'Provided File', |
| 41 | + 'verbose_name_plural': 'Provided Files', |
| 42 | + 'abstract': False, |
| 43 | + 'base_manager_name': 'objects', |
| 44 | + }, |
| 45 | + bases=(sponsors.models.benefits.ProvidedAssetMixin, 'sponsors.benefitfeature', models.Model), |
| 46 | + ), |
| 47 | + migrations.CreateModel( |
| 48 | + name='ProvidedFileAssetConfiguration', |
| 49 | + fields=[ |
| 50 | + ('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')), |
| 51 | + ('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')), |
| 52 | + ('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')), |
| 53 | + ('shared', models.BooleanField(default=False)), |
| 54 | + ('label', models.CharField(help_text="What's the title used to display the file to the sponsor?", max_length=256)), |
| 55 | + ('help_text', models.CharField(blank=True, default='', help_text='Any helper comment on how the file should be used', max_length=256)), |
| 56 | + ('shared_file', models.FileField(blank=True, null=True, upload_to='')), |
| 57 | + ], |
| 58 | + options={ |
| 59 | + 'verbose_name': 'Provided File Configuration', |
| 60 | + 'verbose_name_plural': 'Provided File Configurations', |
| 61 | + 'abstract': False, |
| 62 | + 'base_manager_name': 'objects', |
| 63 | + }, |
| 64 | + bases=(sponsors.models.benefits.AssetConfigurationMixin, 'sponsors.benefitfeatureconfiguration', models.Model), |
| 65 | + ), |
| 66 | + migrations.AddField( |
| 67 | + model_name='providedtextasset', |
| 68 | + name='shared', |
| 69 | + field=models.BooleanField(default=False), |
| 70 | + ), |
| 71 | + migrations.AddField( |
| 72 | + model_name='providedtextassetconfiguration', |
| 73 | + name='shared', |
| 74 | + field=models.BooleanField(default=False), |
| 75 | + ), |
| 76 | + migrations.AddConstraint( |
| 77 | + model_name='providedfileassetconfiguration', |
| 78 | + constraint=models.UniqueConstraint(fields=('internal_name',), name='uniq_provided_file_asset_cfg'), |
| 79 | + ), |
| 80 | + ] |
0 commit comments