Fixed #31468 -- Allowed specifying migration filename in Operation.

This adds also suggested filename for many built-in operations.
This commit is contained in:
Adam Johnson 2019-11-23 11:08:45 +00:00 committed by Mariusz Felisiak
parent 5bd585a82d
commit fa58450a9a
10 changed files with 149 additions and 13 deletions

View file

@ -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.