From 416135ca3a2ae22347253fdc7f9873604fbf8fd0 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 21 Jan 2021 22:06:58 +0100 Subject: [PATCH] Squash migrations --- apps/logs/migrations/0001_initial.py | 4 +- apps/participation/migrations/0001_initial.py | 52 +++++++++++++++---- ...230_1302.py => 0002_auto_20210121_2206.py} | 40 ++++++++++++-- .../migrations/0003_tournament_max_teams.py | 18 ------- .../migrations/0004_tournament_price.py | 18 ------- .../migrations/0005_auto_20210101_1149.py | 24 --------- .../migrations/0006_participation_final.py | 18 ------- .../migrations/0007_auto_20210112_1801.py | 29 ----------- .../migrations/0008_auto_20210113_1700.py | 18 ------- .../migrations/0009_auto_20210114_1313.py | 43 --------------- .../0010_passage_solution_number.py | 19 ------- apps/participation/migrations/0011_note.py | 33 ------------ .../migrations/0012_pool_bbb_code.py | 19 ------- apps/registration/migrations/0001_initial.py | 23 ++++++-- apps/registration/migrations/0002_payment.py | 26 ---------- .../migrations/0003_auto_20210118_1738.py | 23 -------- .../migrations/0004_auto_20210121_2153.py | 23 -------- 17 files changed, 99 insertions(+), 331 deletions(-) rename apps/participation/migrations/{0002_auto_20201230_1302.py => 0002_auto_20210121_2206.py} (65%) delete mode 100644 apps/participation/migrations/0003_tournament_max_teams.py delete mode 100644 apps/participation/migrations/0004_tournament_price.py delete mode 100644 apps/participation/migrations/0005_auto_20210101_1149.py delete mode 100644 apps/participation/migrations/0006_participation_final.py delete mode 100644 apps/participation/migrations/0007_auto_20210112_1801.py delete mode 100644 apps/participation/migrations/0008_auto_20210113_1700.py delete mode 100644 apps/participation/migrations/0009_auto_20210114_1313.py delete mode 100644 apps/participation/migrations/0010_passage_solution_number.py delete mode 100644 apps/participation/migrations/0011_note.py delete mode 100644 apps/participation/migrations/0012_pool_bbb_code.py delete mode 100644 apps/registration/migrations/0002_payment.py delete mode 100644 apps/registration/migrations/0003_auto_20210118_1738.py delete mode 100644 apps/registration/migrations/0004_auto_20210121_2153.py diff --git a/apps/logs/migrations/0001_initial.py b/apps/logs/migrations/0001_initial.py index 1e08d02..14b9bdf 100644 --- a/apps/logs/migrations/0001_initial.py +++ b/apps/logs/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.1.3 on 2020-11-04 12:05 +# Generated by Django 3.0.11 on 2021-01-21 21:06 from django.conf import settings from django.db import migrations, models @@ -26,7 +26,7 @@ class Migration(migrations.Migration): ('data', models.TextField(blank=True, default='', verbose_name='new data')), ('action', models.CharField(choices=[('create', 'create'), ('edit', 'edit'), ('delete', 'delete')], default='edit', max_length=16, verbose_name='action')), ('timestamp', models.DateTimeField(default=django.utils.timezone.now, verbose_name='timestamp')), - ('model', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='contenttypes.contenttype', verbose_name='model')), + ('model', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='contenttypes.ContentType', verbose_name='model')), ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='user')), ], options={ diff --git a/apps/participation/migrations/0001_initial.py b/apps/participation/migrations/0001_initial.py index 8e526ee..44441c6 100644 --- a/apps/participation/migrations/0001_initial.py +++ b/apps/participation/migrations/0001_initial.py @@ -1,10 +1,10 @@ -# Generated by Django 3.0.11 on 2020-12-30 12:02 - -from datetime import date +# Generated by Django 3.0.11 on 2021-01-21 21:06 +import datetime import django.core.validators from django.db import migrations, models import django.utils.timezone +import participation.models class Migration(migrations.Migration): @@ -15,22 +15,52 @@ class Migration(migrations.Migration): ] operations = [ + migrations.CreateModel( + name='Note', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('defender_writing', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12), (13, 13), (14, 14), (15, 15), (16, 16), (17, 17), (18, 18), (19, 19), (20, 20)], default=0, verbose_name='defender writing note')), + ('defender_oral', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12), (13, 13), (14, 14), (15, 15), (16, 16)], default=0, verbose_name='defender oral note')), + ('opponent_writing', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9)], default=0, verbose_name='opponent writing note')), + ('opponent_oral', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10)], default=0, verbose_name='opponent oral note')), + ('reporter_writing', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9)], default=0, verbose_name='reporter writing note')), + ('reporter_oral', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10)], default=0, verbose_name='reporter oral note')), + ], + options={ + 'verbose_name': 'note', + 'verbose_name_plural': 'notes', + }, + ), migrations.CreateModel( name='Participation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('valid', models.BooleanField(default=None, help_text='The participation got the validation of the organizers.', null=True, verbose_name='valid')), + ('final', models.BooleanField(default=False, help_text='The team is selected for the final tournament.', verbose_name='selected for final')), ], options={ 'verbose_name': 'participation', 'verbose_name_plural': 'participations', }, ), + migrations.CreateModel( + name='Passage', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('place', models.CharField(default='Non indiqué', help_text='Where the solution is presented?', max_length=255, verbose_name='place')), + ('solution_number', models.PositiveSmallIntegerField(choices=[(1, 'Problem #1'), (2, 'Problem #2'), (3, 'Problem #3'), (4, 'Problem #4'), (5, 'Problem #5'), (6, 'Problem #6'), (7, 'Problem #7'), (8, 'Problem #8')], verbose_name='defended solution')), + ], + options={ + 'verbose_name': 'passage', + 'verbose_name_plural': 'passages', + }, + ), migrations.CreateModel( name='Pool', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('round', models.PositiveSmallIntegerField(verbose_name='round')), + ('round', models.PositiveSmallIntegerField(choices=[(1, 'Round 1'), (2, 'Round 2')], verbose_name='round')), + ('bbb_code', models.CharField(blank=True, default='', help_text='The code of the form xxx-xxx-xxx at the end of the BBB link.', max_length=11, validators=[django.core.validators.RegexValidator('[a-z]{3}-[a-z]{3}-[a-z]{3}')], verbose_name='BigBlueButton code')), ], options={ 'verbose_name': 'pool', @@ -41,9 +71,9 @@ class Migration(migrations.Migration): name='Solution', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('problem', models.PositiveSmallIntegerField(verbose_name='problem')), + ('problem', models.PositiveSmallIntegerField(choices=[(1, 'Problem #1'), (2, 'Problem #2'), (3, 'Problem #3'), (4, 'Problem #4'), (5, 'Problem #5'), (6, 'Problem #6'), (7, 'Problem #7'), (8, 'Problem #8')], verbose_name='problem')), ('final_solution', models.BooleanField(default=False, verbose_name='solution for the final tournament')), - ('file', models.FileField(blank=True, default='', unique=True, upload_to='solutions/', verbose_name='file')), + ('file', models.FileField(blank=True, default='', unique=True, upload_to=participation.models.get_solution_filename, verbose_name='file')), ], options={ 'verbose_name': 'solution', @@ -55,7 +85,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('type', models.PositiveSmallIntegerField(choices=[(1, 'opponent'), (2, 'reporter')])), - ('file', models.FileField(blank=True, default='', unique=True, upload_to='syntheses/', verbose_name='file')), + ('file', models.FileField(blank=True, default='', unique=True, upload_to=participation.models.get_synthesis_filename, verbose_name='file')), ], options={ 'verbose_name': 'synthesis', @@ -80,11 +110,15 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=255, unique=True, verbose_name='name')), - ('date_start', models.DateField(default=date.today, verbose_name='start')), - ('date_end', models.DateField(default=date.today, verbose_name='end')), + ('date_start', models.DateField(default=datetime.date.today, verbose_name='start')), + ('date_end', models.DateField(default=datetime.date.today, verbose_name='end')), + ('max_teams', models.PositiveSmallIntegerField(default=9, verbose_name='max team count')), + ('price', models.PositiveSmallIntegerField(default=21, verbose_name='price')), ('inscription_limit', models.DateTimeField(default=django.utils.timezone.now, verbose_name='limit date for registrations')), ('solution_limit', models.DateTimeField(default=django.utils.timezone.now, verbose_name='limit date to upload solutions')), + ('solutions_draw', models.DateTimeField(default=django.utils.timezone.now, verbose_name='random draw for solutions')), ('syntheses_first_phase_limit', models.DateTimeField(default=django.utils.timezone.now, verbose_name='limit date to upload the syntheses for the first phase')), + ('solutions_available_second_phase', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date when the solutions for the second round become available')), ('syntheses_second_phase_limit', models.DateTimeField(default=django.utils.timezone.now, verbose_name='limit date to upload the syntheses for the second phase')), ('description', models.TextField(blank=True, verbose_name='description')), ('final', models.BooleanField(default=False, verbose_name='final')), diff --git a/apps/participation/migrations/0002_auto_20201230_1302.py b/apps/participation/migrations/0002_auto_20210121_2206.py similarity index 65% rename from apps/participation/migrations/0002_auto_20201230_1302.py rename to apps/participation/migrations/0002_auto_20210121_2206.py index afa485f..101af95 100644 --- a/apps/participation/migrations/0002_auto_20201230_1302.py +++ b/apps/participation/migrations/0002_auto_20210121_2206.py @@ -1,4 +1,4 @@ -# Generated by Django 3.0.11 on 2020-12-30 12:02 +# Generated by Django 3.0.11 on 2021-01-21 21:06 import address.models from django.db import migrations, models @@ -10,8 +10,8 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('registration', '0001_initial'), ('address', '0003_auto_20200830_1851'), + ('registration', '0001_initial'), ('participation', '0001_initial'), ] @@ -37,8 +37,8 @@ class Migration(migrations.Migration): ), migrations.AddField( model_name='synthesis', - name='pool', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='syntheses', to='participation.Pool', verbose_name='pool'), + name='passage', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='syntheses', to='participation.Passage', verbose_name='passage'), ), migrations.AddField( model_name='solution', @@ -60,6 +60,26 @@ class Migration(migrations.Migration): name='tournament', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pools', to='participation.Tournament', verbose_name='tournament'), ), + migrations.AddField( + model_name='passage', + name='defender', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='participation.Participation', verbose_name='defender'), + ), + migrations.AddField( + model_name='passage', + name='opponent', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='participation.Participation', verbose_name='opponent'), + ), + migrations.AddField( + model_name='passage', + name='pool', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='passages', to='participation.Pool', verbose_name='pool'), + ), + migrations.AddField( + model_name='passage', + name='reporter', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='participation.Participation', verbose_name='reporter'), + ), migrations.AddField( model_name='participation', name='team', @@ -70,13 +90,23 @@ class Migration(migrations.Migration): name='tournament', field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='participation.Tournament', verbose_name='tournament'), ), + migrations.AddField( + model_name='note', + name='jury', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes', to='registration.VolunteerRegistration', verbose_name='jury'), + ), + migrations.AddField( + model_name='note', + name='passage', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes', to='participation.Passage', verbose_name='passage'), + ), migrations.AddIndex( model_name='tournament', index=models.Index(fields=['name', 'date_start', 'date_end'], name='participati_name_b43174_idx'), ), migrations.AlterUniqueTogether( name='synthesis', - unique_together={('participation', 'pool', 'type')}, + unique_together={('participation', 'passage', 'type')}, ), migrations.AlterUniqueTogether( name='solution', diff --git a/apps/participation/migrations/0003_tournament_max_teams.py b/apps/participation/migrations/0003_tournament_max_teams.py deleted file mode 100644 index 1b682b5..0000000 --- a/apps/participation/migrations/0003_tournament_max_teams.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.11 on 2020-12-31 11:25 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('participation', '0002_auto_20201230_1302'), - ] - - operations = [ - migrations.AddField( - model_name='tournament', - name='max_teams', - field=models.PositiveSmallIntegerField(default=9, verbose_name='max team count'), - ), - ] diff --git a/apps/participation/migrations/0004_tournament_price.py b/apps/participation/migrations/0004_tournament_price.py deleted file mode 100644 index d6ad916..0000000 --- a/apps/participation/migrations/0004_tournament_price.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.11 on 2021-01-01 10:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('participation', '0003_tournament_max_teams'), - ] - - operations = [ - migrations.AddField( - model_name='tournament', - name='price', - field=models.PositiveSmallIntegerField(default=21, verbose_name='price'), - ), - ] diff --git a/apps/participation/migrations/0005_auto_20210101_1149.py b/apps/participation/migrations/0005_auto_20210101_1149.py deleted file mode 100644 index 909c5fc..0000000 --- a/apps/participation/migrations/0005_auto_20210101_1149.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 3.0.11 on 2021-01-01 10:49 - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('participation', '0004_tournament_price'), - ] - - operations = [ - migrations.AddField( - model_name='tournament', - name='solutions_available_second_phase', - field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='date when the solutions for the second round become available'), - ), - migrations.AddField( - model_name='tournament', - name='solutions_draw', - field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='random draw for solutions'), - ), - ] diff --git a/apps/participation/migrations/0006_participation_final.py b/apps/participation/migrations/0006_participation_final.py deleted file mode 100644 index 85d01f4..0000000 --- a/apps/participation/migrations/0006_participation_final.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.11 on 2021-01-12 16:07 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('participation', '0005_auto_20210101_1149'), - ] - - operations = [ - migrations.AddField( - model_name='participation', - name='final', - field=models.BooleanField(default=False, help_text='The team is selected for the final tournament.', verbose_name='selected for final'), - ), - ] diff --git a/apps/participation/migrations/0007_auto_20210112_1801.py b/apps/participation/migrations/0007_auto_20210112_1801.py deleted file mode 100644 index e2a46ed..0000000 --- a/apps/participation/migrations/0007_auto_20210112_1801.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 3.0.11 on 2021-01-12 17:01 - -from django.db import migrations, models -import participation.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('participation', '0006_participation_final'), - ] - - operations = [ - migrations.AlterField( - model_name='solution', - name='file', - field=models.FileField(blank=True, default='', unique=True, upload_to=participation.models.get_solution_filename, verbose_name='file'), - ), - migrations.AlterField( - model_name='solution', - name='problem', - field=models.PositiveSmallIntegerField(choices=[(1, 'Problem #1'), (2, 'Problem #2'), (3, 'Problem #3'), (4, 'Problem #4'), (5, 'Problem #5'), (6, 'Problem #6'), (7, 'Problem #7'), (8, 'Problem #8')], verbose_name='problem'), - ), - migrations.AlterField( - model_name='synthesis', - name='file', - field=models.FileField(blank=True, default='', unique=True, upload_to=participation.models.get_synthesis_filename, verbose_name='file'), - ), - ] diff --git a/apps/participation/migrations/0008_auto_20210113_1700.py b/apps/participation/migrations/0008_auto_20210113_1700.py deleted file mode 100644 index 9beea1c..0000000 --- a/apps/participation/migrations/0008_auto_20210113_1700.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.11 on 2021-01-13 16:00 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('participation', '0007_auto_20210112_1801'), - ] - - operations = [ - migrations.AlterField( - model_name='pool', - name='round', - field=models.PositiveSmallIntegerField(choices=[(1, 'Round 1'), (2, 'Round 2')], verbose_name='round'), - ), - ] diff --git a/apps/participation/migrations/0009_auto_20210114_1313.py b/apps/participation/migrations/0009_auto_20210114_1313.py deleted file mode 100644 index 64b6657..0000000 --- a/apps/participation/migrations/0009_auto_20210114_1313.py +++ /dev/null @@ -1,43 +0,0 @@ -# Generated by Django 3.0.11 on 2021-01-14 12:13 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('participation', '0008_auto_20210113_1700'), - ] - - operations = [ - migrations.CreateModel( - name='Passage', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('place', models.CharField(default='Non indiqué', help_text='Where the solution is presented?', max_length=255, verbose_name='place')), - ('defender', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='participation.Participation', verbose_name='defender')), - ('opponent', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='participation.Participation', verbose_name='opponent')), - ('pool', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='passages', to='participation.Pool', verbose_name='pool')), - ('reporter', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='participation.Participation', verbose_name='reporter')), - ], - options={ - 'verbose_name': 'passage', - 'verbose_name_plural': 'passages', - }, - ), - migrations.AddField( - model_name='synthesis', - name='passage', - field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='syntheses', to='participation.Passage', verbose_name='passage'), - preserve_default=False, - ), - migrations.AlterUniqueTogether( - name='synthesis', - unique_together={('participation', 'passage', 'type')}, - ), - migrations.RemoveField( - model_name='synthesis', - name='pool', - ), - ] diff --git a/apps/participation/migrations/0010_passage_solution_number.py b/apps/participation/migrations/0010_passage_solution_number.py deleted file mode 100644 index 2c23ee5..0000000 --- a/apps/participation/migrations/0010_passage_solution_number.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 3.0.11 on 2021-01-14 13:53 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('participation', '0009_auto_20210114_1313'), - ] - - operations = [ - migrations.AddField( - model_name='passage', - name='solution_number', - field=models.PositiveSmallIntegerField(choices=[(1, 'Problem #1'), (2, 'Problem #2'), (3, 'Problem #3'), (4, 'Problem #4'), (5, 'Problem #5'), (6, 'Problem #6'), (7, 'Problem #7'), (8, 'Problem #8')], default=None, verbose_name='defended solution'), - preserve_default=False, - ), - ] diff --git a/apps/participation/migrations/0011_note.py b/apps/participation/migrations/0011_note.py deleted file mode 100644 index 74d308a..0000000 --- a/apps/participation/migrations/0011_note.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 3.0.11 on 2021-01-14 16:59 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('registration', '0001_initial'), - ('participation', '0010_passage_solution_number'), - ] - - operations = [ - migrations.CreateModel( - name='Note', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('defender_writing', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12), (13, 13), (14, 14), (15, 15), (16, 16), (17, 17), (18, 18), (19, 19), (20, 20)], default=0, verbose_name='defender writing note')), - ('defender_oral', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12), (13, 13), (14, 14), (15, 15), (16, 16)], default=0, verbose_name='defender oral note')), - ('opponent_writing', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9)], default=0, verbose_name='opponent writing note')), - ('opponent_oral', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10)], default=0, verbose_name='opponent oral note')), - ('reporter_writing', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9)], default=0, verbose_name='reporter writing note')), - ('reporter_oral', models.PositiveSmallIntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10)], default=0, verbose_name='reporter oral note')), - ('jury', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes', to='registration.VolunteerRegistration', verbose_name='jury')), - ('passage', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes', to='participation.Passage', verbose_name='passage')), - ], - options={ - 'verbose_name': 'note', - 'verbose_name_plural': 'notes', - }, - ), - ] diff --git a/apps/participation/migrations/0012_pool_bbb_code.py b/apps/participation/migrations/0012_pool_bbb_code.py deleted file mode 100644 index 4f6ddc9..0000000 --- a/apps/participation/migrations/0012_pool_bbb_code.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 3.0.11 on 2021-01-21 16:47 - -import django.core.validators -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('participation', '0011_note'), - ] - - operations = [ - migrations.AddField( - model_name='pool', - name='bbb_code', - field=models.CharField(blank=True, default='', help_text='The code of the form xxx-xxx-xxx at the end of the BBB link.', max_length=11, validators=[django.core.validators.RegexValidator('[a-z]{3}-[a-z]{3}-[a-z]{3}')], verbose_name='BigBlueButton code'), - ), - ] diff --git a/apps/registration/migrations/0001_initial.py b/apps/registration/migrations/0001_initial.py index d87bb4e..d0fd2db 100644 --- a/apps/registration/migrations/0001_initial.py +++ b/apps/registration/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.0.11 on 2020-12-30 12:02 +# Generated by Django 3.0.11 on 2021-01-21 21:06 import address.models import datetime @@ -14,10 +14,10 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('contenttypes', '0002_remove_content_type_name'), ('address', '0003_auto_20200830_1851'), - ('participation', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('contenttypes', '0002_remove_content_type_name'), + ('participation', '0001_initial'), ] operations = [ @@ -42,7 +42,6 @@ class Migration(migrations.Migration): ('birth_date', models.DateField(default=datetime.date.today, verbose_name='birth date')), ('phone_number', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, verbose_name='phone number')), ('photo_authorization', models.FileField(blank=True, default='', upload_to=registration.models.get_random_photo_filename, verbose_name='photo authorization')), - ('health_sheet', models.FileField(blank=True, default='', upload_to=registration.models.get_random_health_filename, verbose_name='health sheet')), ('address', address.models.AddressField(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='address.Address', verbose_name='address')), ('team', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='participants', to='participation.Team', verbose_name='team')), ], @@ -98,6 +97,7 @@ class Migration(migrations.Migration): ('responsible_phone', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None, verbose_name='responsible phone number')), ('responsible_email', models.EmailField(default='', max_length=254, verbose_name='responsible email address')), ('parental_authorization', models.FileField(blank=True, default='', upload_to=registration.models.get_random_parental_filename, verbose_name='parental authorization')), + ('health_sheet', models.FileField(blank=True, default='', upload_to=registration.models.get_random_health_filename, verbose_name='health sheet')), ], options={ 'verbose_name': 'student registration', @@ -105,4 +105,19 @@ class Migration(migrations.Migration): }, bases=('registration.participantregistration',), ), + migrations.CreateModel( + name='Payment', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('type', models.CharField(blank=True, choices=[('', 'No payment'), ('helloasso', 'Hello Asso'), ('scholarship', 'Scholarship'), ('bank_transfer', 'Bank transfer'), ('free', 'The tournament is free')], default='', max_length=16, verbose_name='type')), + ('scholarship_file', models.FileField(blank=True, default='', help_text='only if you have a scholarship.', upload_to=registration.models.get_scholarship_filename, verbose_name='scholarship file')), + ('additional_information', models.TextField(blank=True, default='', help_text='To help us to find your payment.', verbose_name='additional information')), + ('valid', models.BooleanField(default=False, null=True, verbose_name='valid')), + ('registration', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='payment', to='registration.ParticipantRegistration', verbose_name='registration')), + ], + options={ + 'verbose_name': 'payment', + 'verbose_name_plural': 'payments', + }, + ), ] diff --git a/apps/registration/migrations/0002_payment.py b/apps/registration/migrations/0002_payment.py deleted file mode 100644 index 0217e12..0000000 --- a/apps/registration/migrations/0002_payment.py +++ /dev/null @@ -1,26 +0,0 @@ -# Generated by Django 3.0.11 on 2021-01-18 15:35 - -from django.db import migrations, models -import django.db.models.deletion -import registration.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('registration', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Payment', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('type', models.CharField(blank=True, choices=[('', 'No payment'), ('helloasso', 'Hello Asso'), ('scholarship', 'Scholarship'), ('bank_transfer', 'Bank transfer'), ('free', 'The tournament is free')], default='', max_length=16, verbose_name='type')), - ('scholarship_file', models.FileField(blank=True, default='', help_text='only if you have a scholarship.', upload_to=registration.models.get_scholarship_filename, verbose_name='scholarship file')), - ('additional_information', models.TextField(blank=True, default='', help_text='To help us to find your payment.', verbose_name='additional information')), - ('valid', models.BooleanField(default=False, null=True, verbose_name='valid')), - ('registration', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='registration', to='registration.ParticipantRegistration', verbose_name='registration')), - ], - ), - ] diff --git a/apps/registration/migrations/0003_auto_20210118_1738.py b/apps/registration/migrations/0003_auto_20210118_1738.py deleted file mode 100644 index 40d843d..0000000 --- a/apps/registration/migrations/0003_auto_20210118_1738.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.0.11 on 2021-01-18 16:38 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('registration', '0002_payment'), - ] - - operations = [ - migrations.AlterModelOptions( - name='payment', - options={'verbose_name': 'payment', 'verbose_name_plural': 'payments'}, - ), - migrations.AlterField( - model_name='payment', - name='registration', - field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='payment', to='registration.ParticipantRegistration', verbose_name='registration'), - ), - ] diff --git a/apps/registration/migrations/0004_auto_20210121_2153.py b/apps/registration/migrations/0004_auto_20210121_2153.py deleted file mode 100644 index bdb2728..0000000 --- a/apps/registration/migrations/0004_auto_20210121_2153.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.0.11 on 2021-01-21 20:53 - -from django.db import migrations, models -import registration.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('registration', '0003_auto_20210118_1738'), - ] - - operations = [ - migrations.RemoveField( - model_name='participantregistration', - name='health_sheet', - ), - migrations.AddField( - model_name='studentregistration', - name='health_sheet', - field=models.FileField(blank=True, default='', upload_to=registration.models.get_random_health_filename, verbose_name='health sheet'), - ), - ]