diff --git a/ajapaik/ajapaik/migrations/0026_auto_20231231_0026.py b/ajapaik/ajapaik/migrations/0026_auto_20231231_0026.py new file mode 100644 index 000000000..09c315233 --- /dev/null +++ b/ajapaik/ajapaik/migrations/0026_auto_20231231_0026.py @@ -0,0 +1,46 @@ +# Generated by Django 3.2.7 on 2023-12-30 22:26 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('ajapaik', '0025_importblacklist'), + ] + + operations = [ + migrations.CreateModel( + name='PhotoModelSuggestionResult', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('created', models.DateTimeField(auto_now_add=True, db_index=True)), + ('viewpoint_elevation', models.PositiveSmallIntegerField(blank=True, choices=[(0, 'Ground'), (1, 'Raised'), (2, 'Aerial')], null=True, verbose_name='Viewpoint elevation')), + ('scene', models.PositiveSmallIntegerField(blank=True, choices=[(0, 'Interior'), (1, 'Exterior')], null=True, verbose_name='Scene')), + ('photo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ajapaik.photo')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='PhotoModelSuggestionAlternativeCategory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('created', models.DateTimeField(auto_now_add=True, db_index=True)), + ('viewpoint_elevation', models.PositiveSmallIntegerField(blank=True, choices=[(0, 'Ground'), (1, 'Raised'), (2, 'Aerial')], null=True, verbose_name='Viewpoint elevation')), + ('scene', models.PositiveSmallIntegerField(blank=True, choices=[(0, 'Interior'), (1, 'Exterior')], null=True, verbose_name='Scene')), + ('photo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ajapaik.photo')), + ('proposer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='photo_scene_suggestions_alternation', to='ajapaik.profile')), + ], + ), + migrations.AddConstraint( + model_name='photomodelsuggestionalternativecategory', + constraint=models.UniqueConstraint(condition=models.Q(('scene__isnull', True)), fields=('proposer', 'viewpoint_elevation'), name='unique_proposer_viewpoint_elevation_without_scene'), + ), + migrations.AddConstraint( + model_name='photomodelsuggestionalternativecategory', + constraint=models.UniqueConstraint(condition=models.Q(('viewpoint_elevation__isnull', True)), fields=('proposer', 'scene'), name='unique_proposer_scene_without_viewpoint_elevation'), + ), + ]