brewery-website/equipment/migrations/0001_initial.py
2024-06-05 10:07:39 -04:00

128 lines
5.7 KiB
Python

# Generated by Django 5.0.6 on 2024-06-05 13:35
import django.db.models.deletion
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('beer', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='EquipmentType',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('name', models.CharField(max_length=100)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='KegType',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('name', models.CharField(max_length=100)),
('manufacturer', models.CharField(blank=True, max_length=100)),
('size_gal', models.DecimalField(decimal_places=2, max_digits=6)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='MaintenanceType',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('name', models.CharField(max_length=100)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='State',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('name', models.CharField(max_length=100)),
('EquipmentType', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='equipment.equipmenttype')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='TransactionType',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('name', models.CharField(max_length=100)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Equipment',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('name', models.CharField(max_length=100)),
('equipment_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='equipment.equipmenttype')),
('keg_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='equipment.kegtype')),
('state', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='equipment.state')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='EquipmentTransactions',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('beer_batch', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='beer.batch')),
('equipment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='equipment.equipment')),
('transaction_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='equipment.transactiontype')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='EquipmentMaintenance',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('equipment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='equipment.equipment')),
('notes', models.TextField(blank=True, max_length=500, null=True)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='EquipmentMaintenanceLine',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
('notes', models.TextField(blank=True, max_length=500, null=True)),
('maintenance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='equipment.equipmentmaintenance')),
('maintenance_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='equipment.maintenancetype')),
],
options={
'abstract': False,
},
),
]