@@ -14,6 +14,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
1414 supports_column_check_constraints = False
1515 supports_date_lookup_using_string = False
1616 supports_explaining_query_execution = True
17+ supports_expression_defaults = False
1718 supports_expression_indexes = False
1819 supports_foreign_keys = False
1920 supports_ignore_conflicts = False
@@ -84,6 +85,12 @@ class DatabaseFeatures(BaseDatabaseFeatures):
8485 "backends.tests.ThreadTests.test_closing_non_shared_connections" ,
8586 "backends.tests.ThreadTests.test_default_connection_thread_local" ,
8687 # 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" ,
8794 "schema.tests.SchemaTests.test_add_remove_index" ,
8895 "schema.tests.SchemaTests.test_composed_desc_index_with_fk" ,
8996 "schema.tests.SchemaTests.test_composed_index_with_fk" ,
@@ -111,13 +118,27 @@ class DatabaseFeatures(BaseDatabaseFeatures):
111118 "schema.tests.SchemaTests.test_unique" ,
112119 "schema.tests.SchemaTests.test_unique_and_reverse_m2m" ,
113120 # alter_index_together
121+ "migrations.test_operations.OperationTests.test_alter_index_together" ,
114122 "schema.tests.SchemaTests.test_index_together" ,
115123 # alter_unique_together
124+ "migrations.test_operations.OperationTests.test_alter_unique_together" ,
116125 "schema.tests.SchemaTests.test_unique_together" ,
117126 # 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" ,
118130 "schema.tests.SchemaTests.test_composed_constraint_with_fk" ,
119131 "schema.tests.SchemaTests.test_remove_ignored_unique_constraint_not_create_fk_index" ,
120132 "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" ,
121142 }
122143 # $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
123144 _django_test_expected_failures_bitwise = {
@@ -142,6 +163,14 @@ def django_test_expected_failures(self):
142163 # bson.errors.InvalidDocument: cannot encode object:
143164 # <django.db.models.expressions.DatabaseDefault
144165 "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" ,
145174 "schema.tests.SchemaTests.test_db_default_output_field_resolving" ,
146175 "schema.tests.SchemaTests.test_rename_keep_db_default" ,
147176 },
@@ -157,6 +186,10 @@ def django_test_expected_failures(self):
157186 "db_functions.math.test_round.RoundTests.test_decimal_with_precision" ,
158187 "db_functions.math.test_round.RoundTests.test_float_with_precision" ,
159188 },
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+ },
160193 "Pattern lookups on UUIDField are not supported." : {
161194 "model_fields.test_uuid.TestQuerying.test_contains" ,
162195 "model_fields.test_uuid.TestQuerying.test_endswith" ,
@@ -186,6 +219,10 @@ def django_test_expected_failures(self):
186219 "lookup.tests.LookupTests.test_in_ignore_none_with_unhashable_items" ,
187220 "m2m_through_regress.tests.ThroughLoadDataTestCase.test_sequence_creation" ,
188221 "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" ,
189226 "model_fields.test_autofield.AutoFieldTests" ,
190227 "model_fields.test_autofield.BigAutoFieldTests" ,
191228 "model_fields.test_autofield.SmallAutoFieldTests" ,
@@ -503,6 +540,9 @@ def django_test_expected_failures(self):
503540 "expressions.tests.BasicExpressionsTests.test_annotate_values_filter" ,
504541 "expressions.tests.BasicExpressionsTests.test_filtering_on_rawsql_that_is_boolean" ,
505542 "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" ,
506546 "model_fields.test_jsonfield.TestQuerying.test_key_sql_injection_escape" ,
507547 "model_fields.test_jsonfield.TestQuerying.test_key_transform_raw_expression" ,
508548 "model_fields.test_jsonfield.TestQuerying.test_nested_key_transform_raw_expression" ,
@@ -632,6 +672,7 @@ def django_test_expected_failures(self):
632672 },
633673 "transaction.atomic() is not supported." : {
634674 "backends.base.test_base.DatabaseWrapperLoggingTests" ,
675+ "migrations.test_operations.OperationTests.test_run_python_atomic" ,
635676 },
636677 }
637678
0 commit comments