1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00
django/tests/migrations
Simon Charette ffff17d4b0 Fixed #34553 -- Fixed improper % escaping of literal in constraints.
Proper escaping of % in string literals used when defining constaints
was attempted (a8b3f96f6) by overriding quote_value of Postgres and
Oracle schema editor. The same approach was used when adding support for
constraints to the MySQL/MariaDB backend (1fc2c70).

Later on it was discovered that this approach was not appropriate and
that a preferable one was to pass params=None when executing the
constraint creation DDL to avoid any form of interpolation in the first
place (42e8cf47).

When the second patch was applied the corrective of the first were not
removed which caused % literals to be unnecessary doubled. This flew
under the radar because the existings test were crafted in a way that
consecutive %% didn't catch regressions.

This commit introduces an extra test for __exact lookups which
highlights more adequately % doubling problems but also adjust a
previous __endswith test to cover % doubling problems (%\% -> %%\%%).

Thanks Thomas Kolar for the report.

Refs #32369, #30408, #30593.
2023-05-10 17:25:57 +02:00
..
deprecated_field_migrations Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
faulty_migrations
migrations_test_apps Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
related_models_app
test_add_many_to_many_field_initial Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_auto_now_add Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_fake_initial_case_insensitive
test_migrations Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_atomic_operation
test_migrations_backwards_deps_1
test_migrations_bad_pyc
test_migrations_clashing_prefix
test_migrations_conflict Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_conflict_long_name
test_migrations_custom_user
test_migrations_empty
test_migrations_fake_split_initial Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_first Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_initial_false Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_manual_porting
test_migrations_namespace_package
test_migrations_no_ancestor Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_no_changes Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_no_default Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_no_init
test_migrations_no_operations
test_migrations_non_atomic
test_migrations_noop Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_order Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_plan Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_private
test_migrations_run_before Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_squashed Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_squashed_complex Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_squashed_complex_multi_apps Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_squashed_erroneous Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_squashed_extra
test_migrations_squashed_no_replaces Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_squashed_ref_squashed Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_migrations_unmigdep Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
__init__.py
models.py
routers.py
test_autodetector.py Fixed #34529, Refs #34525 -- Reduced index operations with Meta.indexes/index_together when optimizing migrations. 2023-05-03 13:06:19 +02:00
test_base.py Fixed #18468 -- Added support for comments on columns and tables. 2022-12-28 06:28:07 +01:00
test_commands.py Refs #34381 -- Fixed isolation of MigrateTests.test_migrate_fake_initial(). 2023-03-04 13:09:38 +01:00
test_deprecated_fields.py
test_exceptions.py
test_executor.py
test_graph.py Completed test coverage for django.db.migrations.graph. 2023-02-15 07:40:19 +01:00
test_loader.py Used more augmented assignment statements. 2022-10-31 12:30:13 +01:00
test_multidb.py
test_operations.py Fixed #34553 -- Fixed improper % escaping of literal in constraints. 2023-05-10 17:25:57 +02:00
test_optimizer.py Refs #34534 -- Reduced Add/RemoveConstraint and Add/RenameIndex operations when optimizing migrations. 2023-05-09 12:45:09 +02:00
test_questioner.py
test_state.py Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
test_writer.py Fixed #34388 -- Allowed using choice enumeration types directly on model and form fields. 2023-03-21 19:44:41 +01:00