mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
wip supermarket categories
This commit is contained in:
28
cookbook/migrations/0104_auto_20210125_2133.py
Normal file
28
cookbook/migrations/0104_auto_20210125_2133.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 3.1.5 on 2021-01-25 20:33
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cookbook', '0103_food_ignore_shopping'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='SupermarketCategoryRelation',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('order', models.IntegerField(default=0)),
|
||||
('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cookbook.supermarketcategory')),
|
||||
('supermarket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cookbook.supermarket')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='supermarket',
|
||||
name='categories',
|
||||
field=models.ManyToManyField(through='cookbook.SupermarketCategoryRelation', to='cookbook.SupermarketCategory'),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user