This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# Generated by Django 4.2.29 on 2026-06-21 18:21
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('simpsons', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Author',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Category',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Book',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100, verbose_name='Book name')),
|
||||
('author_email', models.EmailField(blank=True, max_length=75, verbose_name='Author email')),
|
||||
('imported', models.BooleanField(default=False)),
|
||||
('published', models.DateField(blank=True, null=True, verbose_name='Published')),
|
||||
('price', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
|
||||
('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='simpsons.author')),
|
||||
('categories', models.ManyToManyField(blank=True, to='simpsons.category')),
|
||||
],
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user