Debian Codegraph @

tests/migrations/test_migrations_squashed/0001_squashed_0002.py

raw
1 from django.db import migrations, models
2
3
4 class Migration(migrations.Migration):
5 replaces = [
6 ("migrations", "0001_initial"),
7 ("migrations", "0002_second"),
8 ]
9
10 operations = [
11 migrations.CreateModel(
12 "Author",
13 [
14 ("id", models.AutoField(primary_key=True)),
15 ("name", models.CharField(max_length=255)),
16 ("slug", models.SlugField(null=True)),
17 ("age", models.IntegerField(default=0)),
18 ("rating", models.IntegerField(default=0)),
19 ],
20 ),
21 migrations.CreateModel(
22 "Book",
23 [
24 ("id", models.AutoField(primary_key=True)),
25 (
26 "author",
27 models.ForeignKey("migrations.Author", models.SET_NULL, null=True),
28 ),
29 ],
30 ),
31 ]