mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #27165 -- Removed unnecessary CreateModel(... 'indexes': []) in migrations.
This commit is contained in:
parent
9023f25278
commit
358c6f21f8
2 changed files with 4 additions and 8 deletions
|
@ -1344,7 +1344,7 @@ class AutodetectorTests(TestCase):
|
|||
self.assertNumberMigrations(changes, "testapp", 1)
|
||||
self.assertOperationTypes(changes, "testapp", 0, ["DeleteModel", "CreateModel"])
|
||||
self.assertOperationAttributes(changes, "testapp", 0, 0, name="AuthorProxy")
|
||||
self.assertOperationAttributes(changes, "testapp", 0, 1, name="AuthorProxy", options={"indexes": []})
|
||||
self.assertOperationAttributes(changes, "testapp", 0, 1, name="AuthorProxy", options={})
|
||||
|
||||
def test_proxy_custom_pk(self):
|
||||
"""
|
||||
|
@ -1434,9 +1434,7 @@ class AutodetectorTests(TestCase):
|
|||
# Right number/type of migrations?
|
||||
self.assertNumberMigrations(changes, 'testapp', 1)
|
||||
self.assertOperationTypes(changes, 'testapp', 0, ["CreateModel"])
|
||||
self.assertOperationAttributes(
|
||||
changes, 'testapp', 0, 0, name="AuthorUnmanaged", options={"managed": False, "indexes": []}
|
||||
)
|
||||
self.assertOperationAttributes(changes, 'testapp', 0, 0, name="AuthorUnmanaged", options={"managed": False})
|
||||
|
||||
def test_unmanaged_to_managed(self):
|
||||
# Now, we test turning an unmanaged model into a managed model
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue