50 lines
2.0 KiB
Python
50 lines
2.0 KiB
Python
# Generated by Django 2.0.1 on 2018-01-31 21:52
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Category',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=64)),
|
|
('description', models.TextField(default='')),
|
|
('created_by', models.IntegerField(default=0)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Keyword',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=64)),
|
|
('description', models.TextField(default='')),
|
|
('created_by', models.IntegerField(default=0)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Recipe',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=64)),
|
|
('created_by', models.IntegerField(default=0)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cookbook.Category')),
|
|
('keywords', models.ManyToManyField(to='cookbook.Keyword')),
|
|
],
|
|
),
|
|
]
|