cmsmanage/paperwork/migrations/0012_waiveraudit_certificationaudit.py

92 lines
3.0 KiB
Python
Raw Permalink Normal View History

# Generated by Django 4.2 on 2023-04-10 05:34
import datetime
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("paperwork", "0011_alter_certificationversion_options"),
]
operations = [
migrations.CreateModel(
name="WaiverAudit",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("date", models.DateField(default=datetime.date.today, unique=True)),
("good", models.BooleanField(default=False)),
("notes", models.CharField(blank=True, max_length=255)),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
to=settings.AUTH_USER_MODEL,
),
),
(
"waiver",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="audits",
to="paperwork.waiver",
),
),
],
options={
"ordering": ["date"],
"get_latest_by": ["date"],
"abstract": False,
},
),
migrations.CreateModel(
name="CertificationAudit",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("date", models.DateField(default=datetime.date.today, unique=True)),
("good", models.BooleanField(default=False)),
("notes", models.CharField(blank=True, max_length=255)),
(
"certification",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="audits",
to="paperwork.certification",
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"ordering": ["date"],
"get_latest_by": ["date"],
"abstract": False,
},
),
]