devicehub-django/lot/migrations/0001_initial.py

95 lines
3.0 KiB
Python
Raw Normal View History

2024-07-30 11:37:08 +00:00
# Generated by Django 5.0.6 on 2024-07-27 16:23
2024-07-09 11:35:35 +00:00
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
2024-07-30 11:37:08 +00:00
name="Lot",
2024-07-09 11:35:35 +00:00
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
2024-07-30 11:37:08 +00:00
("created", models.DateTimeField(auto_now_add=True)),
("updated", models.DateTimeField(auto_now=True)),
("name", models.CharField(blank=True, max_length=64, null=True)),
("code", models.CharField(blank=True, max_length=64, null=True)),
("description", models.CharField(blank=True, max_length=64, null=True)),
("closed", models.BooleanField(default=True)),
2024-07-09 11:35:35 +00:00
(
2024-07-18 15:21:22 +00:00
"owner",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
2024-07-09 11:35:35 +00:00
),
),
2024-07-18 15:21:22 +00:00
],
),
migrations.CreateModel(
2024-07-30 11:37:08 +00:00
name="DeviceLot",
2024-07-18 15:21:22 +00:00
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
2024-07-30 11:37:08 +00:00
("device_id", models.CharField(max_length=256)),
2024-07-09 11:35:35 +00:00
(
2024-07-30 11:37:08 +00:00
"lot",
2024-07-09 11:35:35 +00:00
models.ForeignKey(
2024-07-30 11:37:08 +00:00
on_delete=django.db.models.deletion.CASCADE, to="lot.lot"
2024-07-09 11:35:35 +00:00
),
),
2024-07-30 11:37:08 +00:00
],
),
migrations.CreateModel(
name="LotTag",
fields=[
2024-07-18 15:21:22 +00:00
(
2024-07-30 11:37:08 +00:00
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=64)),
(
"owner",
2024-07-18 15:21:22 +00:00
models.ForeignKey(
2024-07-30 11:37:08 +00:00
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
2024-07-18 15:21:22 +00:00
),
),
2024-07-09 11:35:35 +00:00
],
),
2024-07-30 11:37:08 +00:00
migrations.AddField(
model_name="lot",
name="type",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="lot.lottag"
),
),
2024-07-09 11:35:35 +00:00
]