add migrations
This commit is contained in:
parent
3a340614ed
commit
929f7f287b
37
backend/api/exercices/migrations/0002_initial.py
Normal file
37
backend/api/exercices/migrations/0002_initial.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Generated by Django 4.0 on 2022-07-29 09:08
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('exercices', '0001_initial'),
|
||||||
|
('users', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='tag',
|
||||||
|
name='user',
|
||||||
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='users.customuser'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='exercice',
|
||||||
|
name='author',
|
||||||
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='users.customuser'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='exercice',
|
||||||
|
name='origin',
|
||||||
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='exercices.exercice'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='exercice',
|
||||||
|
name='tags',
|
||||||
|
field=models.ManyToManyField(to='exercices.Tag'),
|
||||||
|
),
|
||||||
|
]
|
26
backend/api/exercices/migrations/0003_generate_code.py
Normal file
26
backend/api/exercices/migrations/0003_generate_code.py
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
from django.db import migrations, models
|
||||||
|
import exercices.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('exercices', '0002_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='exercice',
|
||||||
|
name='id_code',
|
||||||
|
field=models.CharField(
|
||||||
|
max_length=50, default=exercices.models.generate_unique_code_step, unique=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='tag',
|
||||||
|
name='id_code',
|
||||||
|
field=models.CharField(
|
||||||
|
max_length=50, default=exercices.models.generate_unique_code_tag, unique=True),
|
||||||
|
),
|
||||||
|
|
||||||
|
]
|
28
backend/api/room/migrations/0002_initial.py
Normal file
28
backend/api/room/migrations/0002_initial.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Generated by Django 4.0 on 2022-07-29 09:08
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('room', '0001_initial'),
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='room',
|
||||||
|
name='userMembers',
|
||||||
|
field=models.ManyToManyField(to=settings.AUTH_USER_MODEL),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='parcours',
|
||||||
|
name='room',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='room.room'),
|
||||||
|
),
|
||||||
|
]
|
30
backend/api/room/migrations/0003_generate_code.py
Normal file
30
backend/api/room/migrations/0003_generate_code.py
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
from django.db import migrations, models
|
||||||
|
import room.models
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('room', '0002_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='room',
|
||||||
|
name='id_code',
|
||||||
|
field=models.CharField(
|
||||||
|
max_length=50, default=room.models.generate_unique_code_room, unique = True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='parcours',
|
||||||
|
name='id_code',
|
||||||
|
field=models.CharField(
|
||||||
|
max_length=50, default=room.models.generate_unique_code_parcours, unique = True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='tempcorrection',
|
||||||
|
name='id_code',
|
||||||
|
field=models.CharField(
|
||||||
|
max_length=50, default=room.models.generate_unique_code_corr, unique = True),
|
||||||
|
),
|
||||||
|
]
|
26
backend/api/users/migrations/0002_generate_code.py
Normal file
26
backend/api/users/migrations/0002_generate_code.py
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
from django.db import migrations, models
|
||||||
|
import users.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('users', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='customuser',
|
||||||
|
name='id_code',
|
||||||
|
field=models.CharField(
|
||||||
|
max_length=50, default=users.models.generate_unique_code, unique=True),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='customuser',
|
||||||
|
name='clientId',
|
||||||
|
field=models.CharField(
|
||||||
|
max_length=50, default=users.models.generate_unique_uuid, unique=True),
|
||||||
|
),
|
||||||
|
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user