mirror of https://gitlab.crans.org/bde/nk20
56 lines
2.5 KiB
Python
56 lines
2.5 KiB
Python
|
# Generated by Django 2.2.28 on 2024-05-25 11:50
|
||
|
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
import django.utils.timezone
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('member', '0011_profile_vss_charter_read'),
|
||
|
('food', '0002_auto_20240524_2139'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='BasicFood',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=255, verbose_name='name')),
|
||
|
('is_DLC', models.BooleanField(default=False, verbose_name='is DLC')),
|
||
|
('is_DDM', models.BooleanField(default=False, verbose_name='is DDM')),
|
||
|
('expiry_date', models.DateTimeField(blank=True, default=django.utils.timezone.now, null=True, verbose_name='expiry date')),
|
||
|
('label', models.ImageField(default='pic/default.png', max_length=255, upload_to='label/', verbose_name='food label')),
|
||
|
('was_eaten', models.BooleanField(default=False, verbose_name='was eaten')),
|
||
|
('owner', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='member.Club', verbose_name='owner')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'Basic food',
|
||
|
'verbose_name_plural': 'Basic foods',
|
||
|
},
|
||
|
),
|
||
|
migrations.AlterField(
|
||
|
model_name='allergen',
|
||
|
name='basic_food',
|
||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Allergen', to='food.BasicFood', verbose_name='basic food'),
|
||
|
),
|
||
|
migrations.AlterField(
|
||
|
model_name='qr_code',
|
||
|
name='basic_food',
|
||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='QR_code', to='food.BasicFood', verbose_name='basic food'),
|
||
|
),
|
||
|
migrations.RenameModel(
|
||
|
old_name='Transformed_food',
|
||
|
new_name='TransformedFood',
|
||
|
),
|
||
|
migrations.DeleteModel(
|
||
|
name='Basic_food',
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='basicfood',
|
||
|
name='transformed_food',
|
||
|
field=models.ManyToManyField(blank=True, null=True, related_name='BasicFood', to='food.TransformedFood', verbose_name='transformed food'),
|
||
|
),
|
||
|
]
|