This commit is contained in:
Martin Pépin 2020-06-13 18:17:51 +02:00
parent 0d4f848fe5
commit 5047ee14de
No known key found for this signature in database
GPG key ID: E7520278B1774448

View file

@ -9,25 +9,51 @@ class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('authens', '0001_initial'),
("authens", "0001_initial"),
]
operations = [
migrations.CreateModel(
name='OldCASAccount',
name="OldCASAccount",
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('cas_login', models.CharField(max_length=1023, verbose_name='ancien login CAS')),
('entrance_year', models.SmallIntegerField(verbose_name='année de création du compte CAS')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='old_cas_account', to=settings.AUTH_USER_MODEL, verbose_name='utilisateurice')),
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"cas_login",
models.CharField(max_length=1023, verbose_name="ancien login CAS"),
),
(
"entrance_year",
models.SmallIntegerField(
verbose_name="année de création du compte CAS"
),
),
(
"user",
models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE,
related_name="old_cas_account",
to=settings.AUTH_USER_MODEL,
verbose_name="utilisateurice",
),
),
],
options={
'verbose_name': 'Ancien compte CAS',
'verbose_name_plural': 'Anciens comptes CAS',
"verbose_name": "Ancien compte CAS",
"verbose_name_plural": "Anciens comptes CAS",
},
),
migrations.AddConstraint(
model_name='oldcasaccount',
constraint=models.UniqueConstraint(fields=('cas_login', 'entrance_year'), name='clipper_year_uniqueness'),
model_name="oldcasaccount",
constraint=models.UniqueConstraint(
fields=("cas_login", "entrance_year"), name="clipper_year_uniqueness"
),
),
]