mirror of
https://github.com/django/django.git
synced 2025-07-23 13:15:32 +00:00
Fixed #31468 -- Allowed specifying migration filename in Operation.
This adds also suggested filename for many built-in operations.
This commit is contained in:
parent
5bd585a82d
commit
fa58450a9a
10 changed files with 149 additions and 13 deletions
|
@ -175,6 +175,7 @@ class CreateExtensionTests(PostgreSQLTestCase):
|
|||
|
||||
def test_allow_migrate(self):
|
||||
operation = CreateExtension('tablefunc')
|
||||
self.assertEqual(operation.migration_name_fragment, 'create_extension_tablefunc')
|
||||
project_state = ProjectState()
|
||||
new_state = project_state.clone()
|
||||
# Create an extension.
|
||||
|
@ -192,6 +193,7 @@ class CreateExtensionTests(PostgreSQLTestCase):
|
|||
|
||||
def test_create_existing_extension(self):
|
||||
operation = BloomExtension()
|
||||
self.assertEqual(operation.migration_name_fragment, 'create_extension_bloom')
|
||||
project_state = ProjectState()
|
||||
new_state = project_state.clone()
|
||||
# Don't create an existing extension.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue