@@ -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,27 @@ 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
+ "migrations.test_operations.OperationTests.test_add_partial_unique_constraint" ,
128
+ "migrations.test_operations.OperationTests.test_create_model_with_partial_unique_constraint" ,
129
+ "migrations.test_operations.OperationTests.test_remove_partial_unique_constraint" ,
118
130
"schema.tests.SchemaTests.test_composed_constraint_with_fk" ,
119
131
"schema.tests.SchemaTests.test_remove_ignored_unique_constraint_not_create_fk_index" ,
120
132
"schema.tests.SchemaTests.test_unique_constraint" ,
133
+ # constraints not fully implemented.
134
+ "introspection.tests.IntrospectionTests.test_get_constraints" ,
135
+ # pymongo.errors.OperationFailure: Can't rename a collection to itself
136
+ "migrations.test_operations.OperationTests.test_alter_model_table_noop" ,
137
+ "migrations.test_operations.OperationTests.test_rename_model_no_relations_with_db_table_noop" ,
138
+ "migrations.test_operations.OperationTests.test_rename_model_with_db_table_rename_m2m" ,
139
+ # subclasses of BaseDatabaseIntrospection may require a get_constraints() method
140
+ "migrations.test_operations.OperationTests.test_add_func_unique_constraint" ,
141
+ "migrations.test_operations.OperationTests.test_remove_func_unique_constraint" ,
121
142
}
122
143
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
123
144
_django_test_expected_failures_bitwise = {
@@ -142,6 +163,14 @@ def django_test_expected_failures(self):
142
163
# bson.errors.InvalidDocument: cannot encode object:
143
164
# <django.db.models.expressions.DatabaseDefault
144
165
"basic.tests.ModelInstanceCreationTests.test_save_primary_with_db_default" ,
166
+ "migrations.test_operations.OperationTests.test_add_field_both_defaults" ,
167
+ "migrations.test_operations.OperationTests.test_add_field_database_default" ,
168
+ "migrations.test_operations.OperationTests.test_add_field_database_default_special_char_escaping" ,
169
+ "migrations.test_operations.OperationTests.test_alter_field_add_database_default" ,
170
+ "migrations.test_operations.OperationTests.test_alter_field_change_blank_nullable_database_default_to_not_null" ,
171
+ "migrations.test_operations.OperationTests.test_alter_field_change_default_to_database_default" ,
172
+ "migrations.test_operations.OperationTests.test_alter_field_change_nullable_to_database_default_not_null" ,
173
+ "migrations.test_operations.OperationTests.test_alter_field_change_nullable_to_decimal_database_default_not_null" ,
145
174
"schema.tests.SchemaTests.test_db_default_output_field_resolving" ,
146
175
"schema.tests.SchemaTests.test_rename_keep_db_default" ,
147
176
},
@@ -157,6 +186,10 @@ def django_test_expected_failures(self):
157
186
"db_functions.math.test_round.RoundTests.test_decimal_with_precision" ,
158
187
"db_functions.math.test_round.RoundTests.test_float_with_precision" ,
159
188
},
189
+ "MongoDB doesn't rename an index when a field is renamed." : {
190
+ "migrations.test_operations.OperationTests.test_rename_field_index_together" ,
191
+ "migrations.test_operations.OperationTests.test_rename_field_unique_together" ,
192
+ },
160
193
"Pattern lookups on UUIDField are not supported." : {
161
194
"model_fields.test_uuid.TestQuerying.test_contains" ,
162
195
"model_fields.test_uuid.TestQuerying.test_endswith" ,
@@ -186,6 +219,10 @@ def django_test_expected_failures(self):
186
219
"lookup.tests.LookupTests.test_in_ignore_none_with_unhashable_items" ,
187
220
"m2m_through_regress.tests.ThroughLoadDataTestCase.test_sequence_creation" ,
188
221
"many_to_many.tests.ManyToManyTests.test_add_remove_invalid_type" ,
222
+ "migrations.test_operations.OperationTests.test_autofield__bigautofield_foreignfield_growth" ,
223
+ "migrations.test_operations.OperationTests.test_model_with_bigautofield" ,
224
+ "migrations.test_operations.OperationTests.test_smallfield_autofield_foreignfield_growth" ,
225
+ "migrations.test_operations.OperationTests.test_smallfield_bigautofield_foreignfield_growth" ,
189
226
"model_fields.test_autofield.AutoFieldTests" ,
190
227
"model_fields.test_autofield.BigAutoFieldTests" ,
191
228
"model_fields.test_autofield.SmallAutoFieldTests" ,
@@ -503,6 +540,9 @@ def django_test_expected_failures(self):
503
540
"expressions.tests.BasicExpressionsTests.test_annotate_values_filter" ,
504
541
"expressions.tests.BasicExpressionsTests.test_filtering_on_rawsql_that_is_boolean" ,
505
542
"expressions.tests.BasicExpressionsTests.test_order_by_multiline_sql" ,
543
+ "migrations.test_operations.OperationTests.test_run_sql" ,
544
+ "migrations.test_operations.OperationTests.test_run_sql_params" ,
545
+ "migrations.test_operations.OperationTests.test_separate_database_and_state" ,
506
546
"model_fields.test_jsonfield.TestQuerying.test_key_sql_injection_escape" ,
507
547
"model_fields.test_jsonfield.TestQuerying.test_key_transform_raw_expression" ,
508
548
"model_fields.test_jsonfield.TestQuerying.test_nested_key_transform_raw_expression" ,
@@ -632,6 +672,7 @@ def django_test_expected_failures(self):
632
672
},
633
673
"transaction.atomic() is not supported." : {
634
674
"backends.base.test_base.DatabaseWrapperLoggingTests" ,
675
+ "migrations.test_operations.OperationTests.test_run_python_atomic" ,
635
676
},
636
677
}
637
678
0 commit comments