Black
This commit is contained in:
parent
0d4f848fe5
commit
5047ee14de
1 changed files with 36 additions and 10 deletions
|
@ -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"
|
||||
),
|
||||
),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue