You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.1 KiB
Python
72 lines
2.1 KiB
Python
# Generated by Django 4.2.8 on 2026-01-13 16:51
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = []
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Nomenclature",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("code", models.CharField(max_length=50, unique=True)),
|
|
("name", models.CharField(max_length=255)),
|
|
(
|
|
"applies_to",
|
|
models.CharField(
|
|
choices=[("vehicle", "Vehicle"), ("container", "Container")],
|
|
max_length=50,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name="NomenclatureField",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("key", models.CharField(max_length=50)),
|
|
(
|
|
"field_type",
|
|
models.CharField(
|
|
choices=[
|
|
("text", "Text"),
|
|
("number", "Number"),
|
|
("bool", "Boolean"),
|
|
("choice", "Choice"),
|
|
],
|
|
max_length=20,
|
|
),
|
|
),
|
|
(
|
|
"nomenclature",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
to="nomenclatures.nomenclature",
|
|
),
|
|
),
|
|
],
|
|
),
|
|
]
|