Skip to content

Commit

Permalink
More changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ankiaga committed Apr 5, 2024
1 parent 937aad0 commit 07cc789
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
39 changes: 38 additions & 1 deletion django_spanner/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,45 @@ class DatabaseFeatures(BaseDatabaseFeatures):
"queries.tests.QuerySetBitwiseOperationTests.test_xor_with_both_slice",
"queries.tests.QuerySetBitwiseOperationTests.test_xor_with_lhs_slice",
"queries.tests.QuerySetBitwiseOperationTests.test_xor_with_rhs_slice",
"queries.tests.QuerySetBitwiseOperationTests.test_xor_with_both_slice_and_ordering",
"queries.tests.Queries1Tests.test_filter_by_related_field_transform",
"known_related_objects_tests.ExistingRelatedInstancesTests.test_reverse_fk_select_related_multiple"
"known_related_objects.tests.ExistingRelatedInstancesTests.test_reverse_fk_select_related_multiple",
"known_related_objects.tests.ExistingRelatedInstancesTests.test_multilevel_reverse_fk_select_related",
"timezones.tests.NewDatabaseTests.test_aware_time_unsupported",
"contenttypes_tests.test_models.ContentTypesTests.test_app_labeled_name",
"db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_lookup_name_sql_injection",
"db_functions.datetime.test_extract_trunc.DateFunctionTests.test_trunc_lookup_name_sql_injection",
#"db_functions.datetime.test_extract_trunc.DateFunctionTests.test_trunc_time_comparison",
#"db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_time_comparison",
"db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_lookup_name_sql_injection",
"db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_lookup_name_sql_injection",
"db_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_ambiguous_and_invalid_times",
"custom_pk.tests.CustomPKTests.test_auto_field_subclass_create",
"constraints.tests.UniqueConstraintTests.test_validate_expression_condition",
"constraints.tests.CheckConstraintTests.test_validate",
"constraints.tests.CheckConstraintTests.test_validate_boolean_expressions",
"schema.tests.SchemaTests.test_add_auto_field",
"schema.tests.SchemaTests.test_alter_null_with_default_value_deferred_constraints",
"schema.tests.SchemaTests.test_autofield_to_o2o",
#"schema.tests.SchemaTests.test_add_field_durationfield_with_default",
#"backends.tests.LastExecutedQueryTest.test_last_executed_query_dict_overlap_keys",
#"backends.tests.LastExecutedQueryTest.test_last_executed_query_with_duplicate_params",
#"backends.tests.BackendTestCase.test_queries_logger",
"backends.tests.BackendTestCase.test_queries_bare_where",
"expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_right_null",
"expressions.tests.FTimeDeltaTests.test_durationfield_multiply_divide",
#"generic_relations.tests.GenericRelationsTests.test_unsaved_generic_foreign_key_parent_bulk_create",
#"generic_relations.tests.GenericRelationsTests.test_unsaved_generic_foreign_key_parent_save",
#"get_or_create.tests.UpdateOrCreateTests.test_update_only_defaults_and_pre_save_fields_when_local_fields",
"inspectdb.tests.InspectDBTestCase.test_same_relations",
"migrations.test_operations.OperationTests.test_alter_field_pk_fk_char_to_int",
"migrations.test_operations.OperationTests.test_alter_field_with_func_unique_constraint",
"migrations.test_operations.OperationTests.test_alter_model_table_m2m_field",
"migrations.test_operations.OperationTests.test_remove_unique_together_on_unique_field",
"migrations.test_operations.OperationTests.test_rename_field_index_together",
"migrations.test_operations.OperationTests.test_rename_field_unique_together",
"migrations.test_operations.OperationTests.test_rename_model_with_db_table_rename_m2m",
"migrations.test_operations.OperationTests.test_rename_model_with_m2m_models_in_different_apps_with_same_name",
)

if os.environ.get("SPANNER_EMULATOR_HOST", None):
Expand Down
2 changes: 1 addition & 1 deletion django_spanner/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def _alter_field(
):
self.execute(self._create_index_sql(model, fields=[new_field]))

def _alter_column_type_sql(self, model, old_field, new_field, new_type):
def _alter_column_type_sql(self, model, old_field, new_field, new_type, old_collation=None, new_collation=None):
# Spanner needs to use sql_alter_column_not_null if the field is
# NOT NULL, otherwise the constraint is dropped.
sql = (
Expand Down

0 comments on commit 07cc789

Please sign in to comment.