@@ -14,6 +14,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
14
14
supports_column_check_constraints = False
15
15
supports_date_lookup_using_string = False
16
16
supports_explaining_query_execution = True
17
+ supports_expression_defaults = False
17
18
supports_expression_indexes = False
18
19
supports_foreign_keys = False
19
20
supports_ignore_conflicts = False
@@ -84,6 +85,12 @@ class DatabaseFeatures(BaseDatabaseFeatures):
84
85
"backends.tests.ThreadTests.test_closing_non_shared_connections" ,
85
86
"backends.tests.ThreadTests.test_default_connection_thread_local" ,
86
87
# Add/RemoveIndex
88
+ "migrations.test_operations.OperationTests.test_add_index" ,
89
+ "migrations.test_operations.OperationTests.test_alter_field_with_index" ,
90
+ "migrations.test_operations.OperationTests.test_remove_index" ,
91
+ "migrations.test_operations.OperationTests.test_rename_index" ,
92
+ "migrations.test_operations.OperationTests.test_rename_index_unknown_unnamed_index" ,
93
+ "migrations.test_operations.OperationTests.test_rename_index_unnamed_index" ,
87
94
"schema.tests.SchemaTests.test_add_remove_index" ,
88
95
"schema.tests.SchemaTests.test_composed_desc_index_with_fk" ,
89
96
"schema.tests.SchemaTests.test_composed_index_with_fk" ,
@@ -111,13 +118,26 @@ class DatabaseFeatures(BaseDatabaseFeatures):
111
118
"schema.tests.SchemaTests.test_unique" ,
112
119
"schema.tests.SchemaTests.test_unique_and_reverse_m2m" ,
113
120
# alter_index_together
121
+ "migrations.test_operations.OperationTests.test_alter_index_together" ,
114
122
"schema.tests.SchemaTests.test_index_together" ,
115
123
# alter_unique_together
124
+ "migrations.test_operations.OperationTests.test_alter_unique_together" ,
116
125
"schema.tests.SchemaTests.test_unique_together" ,
117
126
# add/remove_constraint
127
+ "introspection.tests.IntrospectionTests.test_get_constraints" ,
128
+ "migrations.test_operations.OperationTests.test_add_partial_unique_constraint" ,
129
+ "migrations.test_operations.OperationTests.test_create_model_with_partial_unique_constraint" ,
130
+ "migrations.test_operations.OperationTests.test_remove_partial_unique_constraint" ,
118
131
"schema.tests.SchemaTests.test_composed_constraint_with_fk" ,
119
132
"schema.tests.SchemaTests.test_remove_ignored_unique_constraint_not_create_fk_index" ,
120
133
"schema.tests.SchemaTests.test_unique_constraint" ,
134
+ # pymongo.errors.OperationFailure: Can't rename a collection to itself
135
+ "migrations.test_operations.OperationTests.test_alter_model_table_noop" ,
136
+ "migrations.test_operations.OperationTests.test_rename_model_no_relations_with_db_table_noop" ,
137
+ "migrations.test_operations.OperationTests.test_rename_model_with_db_table_rename_m2m" ,
138
+ # subclasses of BaseDatabaseIntrospection may require a get_constraints() method
139
+ "migrations.test_operations.OperationTests.test_add_func_unique_constraint" ,
140
+ "migrations.test_operations.OperationTests.test_remove_func_unique_constraint" ,
121
141
}
122
142
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
123
143
_django_test_expected_failures_bitwise = {
@@ -142,6 +162,14 @@ def django_test_expected_failures(self):
142
162
# bson.errors.InvalidDocument: cannot encode object:
143
163
# <django.db.models.expressions.DatabaseDefault
144
164
"basic.tests.ModelInstanceCreationTests.test_save_primary_with_db_default" ,
165
+ "migrations.test_operations.OperationTests.test_add_field_both_defaults" ,
166
+ "migrations.test_operations.OperationTests.test_add_field_database_default" ,
167
+ "migrations.test_operations.OperationTests.test_add_field_database_default_special_char_escaping" ,
168
+ "migrations.test_operations.OperationTests.test_alter_field_add_database_default" ,
169
+ "migrations.test_operations.OperationTests.test_alter_field_change_blank_nullable_database_default_to_not_null" ,
170
+ "migrations.test_operations.OperationTests.test_alter_field_change_default_to_database_default" ,
171
+ "migrations.test_operations.OperationTests.test_alter_field_change_nullable_to_database_default_not_null" ,
172
+ "migrations.test_operations.OperationTests.test_alter_field_change_nullable_to_decimal_database_default_not_null" ,
145
173
"schema.tests.SchemaTests.test_db_default_output_field_resolving" ,
146
174
"schema.tests.SchemaTests.test_rename_keep_db_default" ,
147
175
},
@@ -157,6 +185,10 @@ def django_test_expected_failures(self):
157
185
"db_functions.math.test_round.RoundTests.test_decimal_with_precision" ,
158
186
"db_functions.math.test_round.RoundTests.test_float_with_precision" ,
159
187
},
188
+ "MongoDB doesn't rename an index when a field is renamed." : {
189
+ "migrations.test_operations.OperationTests.test_rename_field_index_together" ,
190
+ "migrations.test_operations.OperationTests.test_rename_field_unique_together" ,
191
+ },
160
192
"Pattern lookups on UUIDField are not supported." : {
161
193
"model_fields.test_uuid.TestQuerying.test_contains" ,
162
194
"model_fields.test_uuid.TestQuerying.test_endswith" ,
@@ -186,6 +218,10 @@ def django_test_expected_failures(self):
186
218
"lookup.tests.LookupTests.test_in_ignore_none_with_unhashable_items" ,
187
219
"m2m_through_regress.tests.ThroughLoadDataTestCase.test_sequence_creation" ,
188
220
"many_to_many.tests.ManyToManyTests.test_add_remove_invalid_type" ,
221
+ "migrations.test_operations.OperationTests.test_autofield__bigautofield_foreignfield_growth" ,
222
+ "migrations.test_operations.OperationTests.test_model_with_bigautofield" ,
223
+ "migrations.test_operations.OperationTests.test_smallfield_autofield_foreignfield_growth" ,
224
+ "migrations.test_operations.OperationTests.test_smallfield_bigautofield_foreignfield_growth" ,
189
225
"model_fields.test_autofield.AutoFieldTests" ,
190
226
"model_fields.test_autofield.BigAutoFieldTests" ,
191
227
"model_fields.test_autofield.SmallAutoFieldTests" ,
@@ -503,6 +539,9 @@ def django_test_expected_failures(self):
503
539
"expressions.tests.BasicExpressionsTests.test_annotate_values_filter" ,
504
540
"expressions.tests.BasicExpressionsTests.test_filtering_on_rawsql_that_is_boolean" ,
505
541
"expressions.tests.BasicExpressionsTests.test_order_by_multiline_sql" ,
542
+ "migrations.test_operations.OperationTests.test_run_sql" ,
543
+ "migrations.test_operations.OperationTests.test_run_sql_params" ,
544
+ "migrations.test_operations.OperationTests.test_separate_database_and_state" ,
506
545
"model_fields.test_jsonfield.TestQuerying.test_key_sql_injection_escape" ,
507
546
"model_fields.test_jsonfield.TestQuerying.test_key_transform_raw_expression" ,
508
547
"model_fields.test_jsonfield.TestQuerying.test_nested_key_transform_raw_expression" ,
@@ -632,6 +671,7 @@ def django_test_expected_failures(self):
632
671
},
633
672
"transaction.atomic() is not supported." : {
634
673
"backends.base.test_base.DatabaseWrapperLoggingTests" ,
674
+ "migrations.test_operations.OperationTests.test_run_python_atomic" ,
635
675
},
636
676
}
637
677
0 commit comments