mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-11 00:58:32 -05:00
merge ignore shopping with onhand
This commit is contained in:
@@ -28,11 +28,11 @@ class Migration(migrations.Migration):
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='food',
|
||||
name='on_hand',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
# migrations.AddField(
|
||||
# model_name='food',
|
||||
# name='on_hand',
|
||||
# field=models.BooleanField(default=False),
|
||||
# ),
|
||||
migrations.AddField(
|
||||
model_name='shoppinglistentry',
|
||||
name='completed_at',
|
||||
|
||||
@@ -21,7 +21,7 @@ def delete_orphaned_sle(apps, schema_editor):
|
||||
|
||||
def create_inheritfields(apps, schema_editor):
|
||||
FoodInheritField.objects.create(name='Supermarket Category', field='supermarket_category')
|
||||
FoodInheritField.objects.create(name='Ignore Shopping', field='ignore_shopping')
|
||||
FoodInheritField.objects.create(name='On Hand', field='food_onhand')
|
||||
FoodInheritField.objects.create(name='Diet', field='diet')
|
||||
FoodInheritField.objects.create(name='Substitute', field='substitute')
|
||||
FoodInheritField.objects.create(name='Substitute Children', field='substitute_children')
|
||||
|
||||
35
cookbook/migrations/0163_auto_20211229_1411.py
Normal file
35
cookbook/migrations/0163_auto_20211229_1411.py
Normal file
@@ -0,0 +1,35 @@
|
||||
# Generated by Django 3.2.10 on 2021-12-29 20:11
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
from cookbook.models import FoodInheritField
|
||||
|
||||
# TODO this can be deleted
|
||||
# def temp_migration(apps, schema_editor):
|
||||
# x = FoodInheritField.objects.get(name='Ignore Shopping', field='ignore_shopping')
|
||||
# x.name = 'On Hand'
|
||||
# x.field = 'food_onhand'
|
||||
# x.save
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cookbook', '0162_userpreference_csv_delim'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
# TODO this can be deleted
|
||||
# migrations.RunPython(temp_migration),
|
||||
# TODO this stays
|
||||
migrations.RenameField(
|
||||
model_name='food',
|
||||
old_name='ignore_shopping',
|
||||
new_name='food_onhand',
|
||||
),
|
||||
# TODO this can be deleted
|
||||
# migrations.RemoveField(
|
||||
# model_name='food',
|
||||
# name='on_hand',
|
||||
# ),
|
||||
]
|
||||
Reference in New Issue
Block a user