tests/migrations/test_migrations_squashed_no_replaces/0001_squashed_0002.py
raw| 1 | from django.db import migrations, models |
| 2 | |
| 3 | |
| 4 | class Migration(migrations.Migration): |
| 5 | operations = [ |
| 6 | migrations.CreateModel( |
| 7 | "Author", |
| 8 | [ |
| 9 | ("id", models.AutoField(primary_key=True)), |
| 10 | ("name", models.CharField(max_length=255)), |
| 11 | ], |
| 12 | ), |
| 13 | migrations.CreateModel( |
| 14 | "Book", |
| 15 | [ |
| 16 | ("id", models.AutoField(primary_key=True)), |
| 17 | ( |
| 18 | "author", |
| 19 | models.ForeignKey("migrations.Author", models.SET_NULL, null=True), |
| 20 | ), |
| 21 | ], |
| 22 | ), |
| 23 | ] |