diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index 93dd6b532..9f880850e 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -97,6 +97,7 @@ jobs: many_to_many many_to_one many_to_one_null + migrations.test_operations model_fields model_forms mutually_referential diff --git a/django_mongodb/features.py b/django_mongodb/features.py index 6236ed770..e0f80b400 100644 --- a/django_mongodb/features.py +++ b/django_mongodb/features.py @@ -4,6 +4,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): allow_sliced_subqueries_with_in = False + allows_multiple_constraints_on_same_fields = False can_create_inline_fk = False can_introspect_foreign_keys = False greatest_least_ignores_nulls = True @@ -13,6 +14,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): supports_column_check_constraints = False supports_date_lookup_using_string = False supports_explaining_query_execution = True + supports_expression_defaults = False supports_expression_indexes = False supports_foreign_keys = False supports_ignore_conflicts = False @@ -83,6 +85,12 @@ class DatabaseFeatures(BaseDatabaseFeatures): "backends.tests.ThreadTests.test_closing_non_shared_connections", "backends.tests.ThreadTests.test_default_connection_thread_local", # Add/RemoveIndex + "migrations.test_operations.OperationTests.test_add_index", + "migrations.test_operations.OperationTests.test_alter_field_with_index", + "migrations.test_operations.OperationTests.test_remove_index", + "migrations.test_operations.OperationTests.test_rename_index", + "migrations.test_operations.OperationTests.test_rename_index_unknown_unnamed_index", + "migrations.test_operations.OperationTests.test_rename_index_unnamed_index", "schema.tests.SchemaTests.test_add_remove_index", "schema.tests.SchemaTests.test_composed_desc_index_with_fk", "schema.tests.SchemaTests.test_composed_index_with_fk", @@ -107,19 +115,29 @@ class DatabaseFeatures(BaseDatabaseFeatures): "schema.tests.SchemaTests.test_remove_constraints_capital_letters", "schema.tests.SchemaTests.test_remove_db_index_doesnt_remove_custom_indexes", # AlterField (unique) - "schema.tests.SchemaTests.test_remove_field_unique_does_not_remove_meta_constraints", "schema.tests.SchemaTests.test_unique", "schema.tests.SchemaTests.test_unique_and_reverse_m2m", # alter_index_together + "migrations.test_operations.OperationTests.test_alter_index_together", "schema.tests.SchemaTests.test_index_together", - "schema.tests.SchemaTests.test_remove_index_together_does_not_remove_meta_indexes", # alter_unique_together - "schema.tests.SchemaTests.test_remove_unique_together_does_not_remove_meta_constraints", + "migrations.test_operations.OperationTests.test_alter_unique_together", "schema.tests.SchemaTests.test_unique_together", # add/remove_constraint + "introspection.tests.IntrospectionTests.test_get_constraints", + "migrations.test_operations.OperationTests.test_add_partial_unique_constraint", + "migrations.test_operations.OperationTests.test_create_model_with_partial_unique_constraint", + "migrations.test_operations.OperationTests.test_remove_partial_unique_constraint", "schema.tests.SchemaTests.test_composed_constraint_with_fk", "schema.tests.SchemaTests.test_remove_ignored_unique_constraint_not_create_fk_index", "schema.tests.SchemaTests.test_unique_constraint", + # pymongo.errors.OperationFailure: Can't rename a collection to itself + "migrations.test_operations.OperationTests.test_alter_model_table_noop", + "migrations.test_operations.OperationTests.test_rename_model_no_relations_with_db_table_noop", + "migrations.test_operations.OperationTests.test_rename_model_with_db_table_rename_m2m", + # subclasses of BaseDatabaseIntrospection may require a get_constraints() method + "migrations.test_operations.OperationTests.test_add_func_unique_constraint", + "migrations.test_operations.OperationTests.test_remove_func_unique_constraint", } # $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3. _django_test_expected_failures_bitwise = { @@ -144,6 +162,14 @@ def django_test_expected_failures(self): # bson.errors.InvalidDocument: cannot encode object: #