fournee/fournée/core/migrations/0001_initial.py
2024-05-09 09:57:01 +02:00

147 lines
4.6 KiB
Python

# Generated by Django 4.2.11 on 2024-04-29 16:46
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="Commande",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("nom", models.CharField(max_length=64)),
],
),
migrations.CreateModel(
name="Fournée",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("date", models.DateField()),
("pour", models.CharField(max_length=64)),
],
),
migrations.CreateModel(
name="Pain",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("nom", models.CharField(max_length=64)),
("poids", models.DecimalField(decimal_places=3, max_digits=6)),
("moulé", models.BooleanField()),
],
),
migrations.CreateModel(
name="Recette",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("nom", models.CharField(max_length=64)),
("poids_de_base", models.DecimalField(decimal_places=3, max_digits=6)),
],
),
migrations.CreateModel(
name="Réservation",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("pour", models.CharField(max_length=64)),
("quantité", models.DecimalField(decimal_places=3, max_digits=6)),
(
"commande",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="core.commande"
),
),
(
"pain",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="core.pain"
),
),
],
),
migrations.AddField(
model_name="pain",
name="pâte",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="core.recette"
),
),
migrations.CreateModel(
name="Ingrédient",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("nom", models.CharField(max_length=64)),
("quantité", models.DecimalField(decimal_places=3, max_digits=6)),
(
"recette",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="core.recette"
),
),
],
),
migrations.AddField(
model_name="commande",
name="fournée",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="core.fournée"
),
),
migrations.AddField(
model_name="commande",
name="pains",
field=models.ManyToManyField(through="core.Réservation", to="core.pain"),
),
]