32 lines
914 B
Python
32 lines
914 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from django.db import models, migrations
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Fact',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
('fact', models.TextField()),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='FactCategory',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
('name', models.CharField(unique=True, max_length=200)),
|
|
],
|
|
),
|
|
migrations.AddField(
|
|
model_name='fact',
|
|
name='category',
|
|
field=models.ForeignKey(to='facts.FactCategory', on_delete=models.CASCADE),
|
|
),
|
|
]
|