fournee/fournée/core/migrations/0015_document.py

47 lines
1.3 KiB
Python
Raw Normal View History

# Generated by Django 4.2.13 on 2024-05-15 10:19
import django.db.models.deletion
2024-05-15 15:38:59 +02:00
from django.db import migrations, models
import fournée.core.models
class Migration(migrations.Migration):
dependencies = [
("core", "0014_fourniture_emballage"),
]
operations = [
migrations.CreateModel(
name="Document",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("nom", models.CharField(max_length=64, unique=True)),
(
"fichier",
models.FileField(
upload_to=fournée.core.models.upload_to, verbose_name="Fichier"
),
),
(
"fourniture",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="core.fourniture",
),
),
],
options={
"ordering": ["nom"],
},
),
]