35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
# Generated by Django 3.2.8 on 2021-10-24 12:41
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Book',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('title', models.CharField(max_length=200)),
|
|
('added', models.DateField(auto_now_add=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Chapter',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('number', models.IntegerField(default=0)),
|
|
('title', models.CharField(max_length=200)),
|
|
('contents', models.TextField()),
|
|
('added', models.DateField(auto_now_add=True)),
|
|
('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='books.book')),
|
|
],
|
|
),
|
|
]
|