53 lines
3.0 KiB
Python
53 lines
3.0 KiB
Python
# Generated by Django 3.2.12 on 2022-03-09 14:12
|
|
|
|
import container.models
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='ContainerType',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('named_id', models.CharField(max_length=40, unique=True)),
|
|
('description', models.CharField(max_length=200)),
|
|
('width', models.IntegerField(verbose_name='width in mm')),
|
|
('height', models.IntegerField(verbose_name='height in mm')),
|
|
('length', models.IntegerField(verbose_name='length in mm')),
|
|
('inner_width', models.IntegerField(verbose_name='inner width in mm')),
|
|
('inner_height', models.IntegerField(verbose_name='inner height in mm')),
|
|
('inner_length', models.IntegerField(verbose_name='inner length in mm')),
|
|
('has_cover', models.BooleanField(verbose_name='container has a cover')),
|
|
('contains_container', models.BooleanField(verbose_name='container can bear container')),
|
|
('created_date', models.DateTimeField(verbose_name='datetime created')),
|
|
('changed_date', models.DateTimeField(verbose_name='datetime updated')),
|
|
('changed_by', models.ForeignKey(on_delete=models.SET(container.models.get_sentinel_user), related_name='changed_container_types', to=settings.AUTH_USER_MODEL)),
|
|
('created_by', models.ForeignKey(on_delete=models.SET(container.models.get_sentinel_user), related_name='created_container_types', to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Container',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('named_id', models.CharField(max_length=40)),
|
|
('color', models.CharField(max_length=60)),
|
|
('description', models.CharField(max_length=200)),
|
|
('created_date', models.DateTimeField(verbose_name='datetime created')),
|
|
('changed_date', models.DateTimeField(verbose_name='datetime updated')),
|
|
('changed_by', models.ForeignKey(on_delete=models.SET(container.models.get_sentinel_user), related_name='changed_container', to=settings.AUTH_USER_MODEL)),
|
|
('container_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='container.containertype')),
|
|
('created_by', models.ForeignKey(on_delete=models.SET(container.models.get_sentinel_user), related_name='created_container', to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
),
|
|
]
|