File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -688,10 +688,6 @@ def django_test_expected_failures(self):
688
688
"migrations.test_commands.MigrateTests.test_sqlmigrate_replaced_migration" ,
689
689
"migrations.test_commands.MigrateTests.test_sqlmigrate_squashed_migration" ,
690
690
},
691
- "SchemaEditor.create_model() must raise DatabaseError rather than "
692
- "pymongo.errors.CollectionInvalid: collection already exists" : {
693
- "migrations.test_commands.MigrateTests.test_migrate_initial_false" ,
694
- },
695
691
}
696
692
697
693
@cached_property
Original file line number Diff line number Diff line change 1
1
from django .db .backends .base .schema import BaseDatabaseSchemaEditor
2
2
3
+ from .query import wrap_database_errors
4
+
3
5
4
6
class DatabaseSchemaEditor (BaseDatabaseSchemaEditor ):
7
+ @wrap_database_errors
5
8
def create_model (self , model ):
6
9
self .connection .database .create_collection (model ._meta .db_table )
7
10
# Make implicit M2M tables.
You can’t perform that action at this time.
0 commit comments