homelog/asset/migrations/0001_initial.py

31 lines
1.3 KiB
Python

# Generated by Django 3.2.12 on 2022-03-10 16:09
import asset.models
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(
name='Asset',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=40)),
('description', models.CharField(blank=True, max_length=250)),
('quantity', models.IntegerField(default=1)),
('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(asset.models.get_sentinel_user), related_name='changed_assets', to=settings.AUTH_USER_MODEL)),
('created_by', models.ForeignKey(on_delete=models.SET(asset.models.get_sentinel_user), related_name='created_assets', to=settings.AUTH_USER_MODEL)),
],
),
]