mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #24375 -- Added Migration.initial attribute
The new attribute is checked when the `migrate --fake-initial` option is used. initial will be set to True for all initial migrations (this is particularly useful when initial migrations are split) as well as for squashed migrations.
This commit is contained in:
parent
a2b999dfca
commit
db97a88495
16 changed files with 232 additions and 16 deletions
|
@ -877,6 +877,9 @@ class AutodetectorTests(TestCase):
|
|||
self.assertOperationTypes(changes, 'otherapp', 1, ["AddField"])
|
||||
self.assertMigrationDependencies(changes, 'otherapp', 0, [])
|
||||
self.assertMigrationDependencies(changes, 'otherapp', 1, [("otherapp", "auto_1"), ("testapp", "auto_1")])
|
||||
# both split migrations should be `initial`
|
||||
self.assertTrue(changes['otherapp'][0].initial)
|
||||
self.assertTrue(changes['otherapp'][1].initial)
|
||||
|
||||
def test_same_app_circular_fk_dependency(self):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue