Skip to content

Commit

Permalink
Add migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
floflo0 committed Nov 1, 2024
1 parent 873900f commit b4b3b5a
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 0 deletions.
20 changes: 20 additions & 0 deletions insalan/partner/migrations/0003_alter_partner_logo.py
Original file line number Diff line number Diff line change
@@ -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'),
),
]
20 changes: 20 additions & 0 deletions insalan/pizza/migrations/0003_alter_pizza_image.py
Original file line number Diff line number Diff line change
@@ -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'),
),
]
Original file line number Diff line number Diff line change
@@ -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'),
),
]
20 changes: 20 additions & 0 deletions insalan/user/migrations/0004_alter_user_image.py
Original file line number Diff line number Diff line change
@@ -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'),
),
]

0 comments on commit b4b3b5a

Please sign in to comment.