From b4b3b5a60b635280ecec92875a25a73e70a42c85 Mon Sep 17 00:00:00 2001 From: Floris Bartra Date: Fri, 1 Nov 2024 16:31:31 +0100 Subject: [PATCH] Add migrations --- .../migrations/0003_alter_partner_logo.py | 20 ++++++ .../migrations/0003_alter_pizza_image.py | 20 ++++++ ..._caster_image_alter_event_logo_and_more.py | 69 +++++++++++++++++++ .../user/migrations/0004_alter_user_image.py | 20 ++++++ 4 files changed, 129 insertions(+) create mode 100644 insalan/partner/migrations/0003_alter_partner_logo.py create mode 100644 insalan/pizza/migrations/0003_alter_pizza_image.py create mode 100644 insalan/tournament/migrations/0010_seat_alter_caster_image_alter_event_logo_and_more.py create mode 100644 insalan/user/migrations/0004_alter_user_image.py diff --git a/insalan/partner/migrations/0003_alter_partner_logo.py b/insalan/partner/migrations/0003_alter_partner_logo.py new file mode 100644 index 00000000..016b1dd0 --- /dev/null +++ b/insalan/partner/migrations/0003_alter_partner_logo.py @@ -0,0 +1,20 @@ +# Generated by Django 4.1.12 on 2024-11-01 15:30 + +import django.core.validators +from django.db import migrations +import insalan.components.image_field + + +class Migration(migrations.Migration): + + dependencies = [ + ('partner', '0002_alter_partner_logo'), + ] + + operations = [ + migrations.AlterField( + model_name='partner', + name='logo', + field=insalan.components.image_field.ImageField(upload_to='partners', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['png', 'jpg', 'jpeg', 'svg', 'webp', 'avif'])], verbose_name='Logo'), + ), + ] diff --git a/insalan/pizza/migrations/0003_alter_pizza_image.py b/insalan/pizza/migrations/0003_alter_pizza_image.py new file mode 100644 index 00000000..41e78bf7 --- /dev/null +++ b/insalan/pizza/migrations/0003_alter_pizza_image.py @@ -0,0 +1,20 @@ +# Generated by Django 4.1.12 on 2024-11-01 15:30 + +import django.core.validators +from django.db import migrations +import insalan.components.image_field + + +class Migration(migrations.Migration): + + dependencies = [ + ('pizza', '0002_alter_order_payment_method'), + ] + + operations = [ + migrations.AlterField( + model_name='pizza', + name='image', + field=insalan.components.image_field.ImageField(blank=True, null=True, upload_to='pizzas', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['png', 'jpg', 'jpeg', 'svg', 'webp', 'avif'])], verbose_name='Image'), + ), + ] diff --git a/insalan/tournament/migrations/0010_seat_alter_caster_image_alter_event_logo_and_more.py b/insalan/tournament/migrations/0010_seat_alter_caster_image_alter_event_logo_and_more.py new file mode 100644 index 00000000..7b25f2b5 --- /dev/null +++ b/insalan/tournament/migrations/0010_seat_alter_caster_image_alter_event_logo_and_more.py @@ -0,0 +1,69 @@ +# Generated by Django 4.1.12 on 2024-11-01 15:30 + +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion +import insalan.components.image_field + + +class Migration(migrations.Migration): + + dependencies = [ + ('tournament', '0009_alter_group_options_alter_match_options_and_more'), + ] + + operations = [ + migrations.CreateModel( + name='Seat', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('x', models.IntegerField(verbose_name='Position horizontale')), + ('y', models.IntegerField(verbose_name='Position verticale')), + ], + options={ + 'verbose_name': 'Place', + 'verbose_name_plural': 'Places', + }, + ), + migrations.AlterField( + model_name='caster', + name='image', + field=insalan.components.image_field.ImageField(blank=True, null=True, upload_to='profile-pictures', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['png', 'jpg', 'jpeg', 'svg', 'webp', 'avif'])], verbose_name='Photo de profil'), + ), + migrations.AlterField( + model_name='event', + name='logo', + field=insalan.components.image_field.ImageField(blank=True, null=True, upload_to='event-icons', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['png', 'jpg', 'jpeg', 'svg', 'webp', 'avif'])], verbose_name='Logo'), + ), + migrations.AlterField( + model_name='tournament', + name='logo', + field=insalan.components.image_field.ImageField(blank=True, null=True, upload_to='tournament-icons', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['png', 'jpg', 'jpeg', 'svg', 'webp', 'avif'])], verbose_name='Logo'), + ), + migrations.CreateModel( + name='SeatSlot', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('seats', models.ManyToManyField(to='tournament.seat', verbose_name='Place')), + ('tournament', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournament.tournament', verbose_name='Tournoi')), + ], + options={ + 'verbose_name': 'Slot', + 'verbose_name_plural': 'Slots', + }, + ), + migrations.AddField( + model_name='seat', + name='event', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tournament.event', verbose_name='Évènement'), + ), + migrations.AddField( + model_name='team', + name='seat_slot', + field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='tournament.seatslot', verbose_name='Slot'), + ), + migrations.AddConstraint( + model_name='seat', + constraint=models.UniqueConstraint(fields=('event', 'x', 'y'), name='one_seat_per_position_per_event'), + ), + ] diff --git a/insalan/user/migrations/0004_alter_user_image.py b/insalan/user/migrations/0004_alter_user_image.py new file mode 100644 index 00000000..b2ae3b88 --- /dev/null +++ b/insalan/user/migrations/0004_alter_user_image.py @@ -0,0 +1,20 @@ +# Generated by Django 4.1.12 on 2024-11-01 15:30 + +import django.core.validators +from django.db import migrations +import insalan.components.image_field + + +class Migration(migrations.Migration): + + dependencies = [ + ('user', '0003_alter_user_image'), + ] + + operations = [ + migrations.AlterField( + model_name='user', + name='image', + field=insalan.components.image_field.ImageField(blank=True, null=True, upload_to='profile-pictures', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['png', 'jpg', 'jpeg', 'svg', 'webp', 'avif'])], verbose_name='photo de profil'), + ), + ]