Initial migrations
This commit is contained in:
parent
52c530488f
commit
f1dab1c0a1
|
@ -0,0 +1,35 @@
|
|||
# Generated by Django 4.0.3 on 2022-04-04 13:15
|
||||
|
||||
import booker.models
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
import homelog
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Scanner',
|
||||
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)),
|
||||
('lwt_topic', models.CharField(max_length=200)),
|
||||
('last_online_ts', models.DateTimeField(verbose_name='last datetime this scanner has been online')),
|
||||
('assigned_channel_name', models.CharField(max_length=200)),
|
||||
('assigned_group_name', models.CharField(max_length=200)),
|
||||
('created_ts', models.DateTimeField(auto_now_add=True, verbose_name='datetime created')),
|
||||
('changed_ts', models.DateTimeField(auto_now=True, verbose_name='datetime updated')),
|
||||
('changed_by', models.ForeignKey(on_delete=models.SET(homelog.system_user.get_deleted_user), related_name='changed_scanners', to=settings.AUTH_USER_MODEL)),
|
||||
('created_by', models.ForeignKey(on_delete=models.SET(homelog.system_user.get_deleted_user), related_name='created_scanners', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
]
|
|
@ -5,6 +5,8 @@ from django.conf import settings
|
|||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
import homelog
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
|
@ -31,8 +33,8 @@ class Migration(migrations.Migration):
|
|||
('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)),
|
||||
('changed_by', models.ForeignKey(on_delete=models.SET(homelog.system_user.get_deleted_user), related_name='changed_container_types', to=settings.AUTH_USER_MODEL)),
|
||||
('created_by', models.ForeignKey(on_delete=models.SET(homelog.system_user.get_deleted_user), related_name='created_container_types', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
|
@ -44,9 +46,9 @@ class Migration(migrations.Migration):
|
|||
('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)),
|
||||
('changed_by', models.ForeignKey(on_delete=models.SET(homelog.system_user.get_deleted_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)),
|
||||
('created_by', models.ForeignKey(on_delete=models.SET(homelog.system_user.get_deleted_user), related_name='created_container', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue