mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #22861: Internal migrations done first so __first__ works
Thanks to Chris Beaven.
This commit is contained in:
parent
09b63a7cce
commit
2cee1d4642
10 changed files with 145 additions and 6 deletions
26
tests/migrations2/test_migrations_2_first/0001_initial.py
Normal file
26
tests/migrations2/test_migrations_2_first/0001_initial.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("migrations", "__first__"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
||||
migrations.CreateModel(
|
||||
"OtherAuthor",
|
||||
[
|
||||
("id", models.AutoField(primary_key=True)),
|
||||
("name", models.CharField(max_length=255)),
|
||||
("slug", models.SlugField(null=True)),
|
||||
("age", models.IntegerField(default=0)),
|
||||
("silly_field", models.BooleanField(default=False)),
|
||||
],
|
||||
),
|
||||
|
||||
]
|
22
tests/migrations2/test_migrations_2_first/0002_second.py
Normal file
22
tests/migrations2/test_migrations_2_first/0002_second.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [("migrations2", "0001_initial")]
|
||||
|
||||
operations = [
|
||||
|
||||
migrations.CreateModel(
|
||||
"Bookstore",
|
||||
[
|
||||
("id", models.AutoField(primary_key=True)),
|
||||
("name", models.CharField(max_length=255)),
|
||||
("slug", models.SlugField(null=True)),
|
||||
],
|
||||
),
|
||||
|
||||
]
|
0
tests/migrations2/test_migrations_2_first/__init__.py
Normal file
0
tests/migrations2/test_migrations_2_first/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue