plateforme-corres2math/apps/registration/migrations/0001_initial.py

75 lines
3.9 KiB
Python
Raw Normal View History

2020-11-04 12:13:34 +00:00
# Generated by Django 3.1.3 on 2020-11-04 12:05
2020-09-21 15:53:07 +00:00
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
2020-11-04 12:13:34 +00:00
import registration.models
2020-09-21 15:53:07 +00:00
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('participation', '0001_initial'),
2020-11-04 12:13:34 +00:00
('contenttypes', '0002_remove_content_type_name'),
2020-09-21 15:53:07 +00:00
]
operations = [
migrations.CreateModel(
name='Registration',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('give_contact_to_animath', models.BooleanField(default=False, verbose_name='Grant Animath to contact me in the future about other actions')),
2020-11-04 12:13:34 +00:00
('email_confirmed', models.BooleanField(default=False, verbose_name='email confirmed')),
2020-09-21 15:53:07 +00:00
('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_registration.registration_set+', to='contenttypes.contenttype')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user')),
],
options={
'verbose_name': 'registration',
'verbose_name_plural': 'registrations',
},
),
migrations.CreateModel(
name='AdminRegistration',
fields=[
('registration_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='registration.registration')),
('role', models.TextField(verbose_name='role of the administrator')),
],
options={
'verbose_name': 'admin registration',
'verbose_name_plural': 'admin registrations',
},
bases=('registration.registration',),
),
migrations.CreateModel(
2020-11-04 12:13:34 +00:00
name='StudentRegistration',
2020-09-21 15:53:07 +00:00
fields=[
('registration_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='registration.registration')),
2020-11-04 12:13:34 +00:00
('student_class', models.IntegerField(choices=[(12, '12th grade'), (11, '11th grade'), (10, '10th grade or lower')], verbose_name='student class')),
('school', models.CharField(max_length=255, verbose_name='school')),
('photo_authorization', models.FileField(blank=True, default='', upload_to=registration.models.get_random_filename, verbose_name='photo authorization')),
('team', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='students', to='participation.team', verbose_name='team')),
2020-09-21 15:53:07 +00:00
],
options={
2020-11-04 12:13:34 +00:00
'verbose_name': 'student registration',
'verbose_name_plural': 'student registrations',
2020-09-21 15:53:07 +00:00
},
bases=('registration.registration',),
),
migrations.CreateModel(
2020-11-04 12:13:34 +00:00
name='CoachRegistration',
2020-09-21 15:53:07 +00:00
fields=[
('registration_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='registration.registration')),
2020-11-04 12:13:34 +00:00
('professional_activity', models.TextField(verbose_name='professional activity')),
('team', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='coachs', to='participation.team', verbose_name='team')),
2020-09-21 15:53:07 +00:00
],
options={
2020-11-04 12:13:34 +00:00
'verbose_name': 'coach registration',
'verbose_name_plural': 'coach registrations',
2020-09-21 15:53:07 +00:00
},
bases=('registration.registration',),
),
]