v1 of books. You can see a list of books.
This commit is contained in:
34
books/migrations/0001_initial.py
Normal file
34
books/migrations/0001_initial.py
Normal file
@@ -0,0 +1,34 @@
|
||||
# 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')),
|
||||
],
|
||||
),
|
||||
]
|
0
books/migrations/__init__.py
Normal file
0
books/migrations/__init__.py
Normal file
Reference in New Issue
Block a user