diff --git a/postgres_composite_types/operations.py b/postgres_composite_types/operations.py index 13b3688..5de9590 100644 --- a/postgres_composite_types/operations.py +++ b/postgres_composite_types/operations.py @@ -47,4 +47,6 @@ def database_forwards(self, app_label, schema_editor, from_state, to_state): ) def database_backwards(self, app_label, schema_editor, from_state, to_state): - return sql_drop_type(self.Meta.db_type, schema_editor=schema_editor) + schema_editor.execute( + sql_drop_type(self.Meta.db_type, schema_editor=schema_editor) + ) diff --git a/tests/test_field.py b/tests/test_field.py index e3045df..4ee6033 100644 --- a/tests/test_field.py +++ b/tests/test_field.py @@ -84,6 +84,7 @@ def test_migration(self): # Run the migration forwards to create the type again migrate(self.migrate_to) + self.assertTrue(does_type_exist(SimpleType._meta.db_type)) # The signal should have been sent self.assertEqual(signal_func.call_count, 1)