| Age | Commit message (Collapse) | Author |
|
|
|
migrate commands.
|
|
|
|
packages.
Also increased coverage of module_loading.py.
|
|
|
|
True on PostgreSQL."
This reverts commit 9cf9c796be8dd53bc3b11355ff39d65c81d7be6d due to a crash on Oracle
as it didn't allow multiple indexes on the same field.
|
|
PostgreSQL.
|
|
constraint.
This is the exact same issue as refs #30408 but for creating a model with a
constraint containing % escapes instead of column addition. All of these issues
stem from a lack of SQL and parameters separation from the BaseConstraint DDL
generating methods preventing them from being mixed with other parts of the
schema alteration logic that do make use of parametrization on some backends
(e.g. Postgres, MySQL for DEFAULT).
Prior to the addition of Field.db_default and GeneratedField in 5.0
parametrization of DDL was never exercised on model creation so this is
effectively a bug with db_default as the GeneratedField case was addressed by
refs #35336.
Thanks Julien Chaumont for the report and Mariusz Felisiak for the review.
|
|
_order fields.
Migrations would crash following the removal of an order_with_respect_to
field from a model and the addition of an _order field.
|
|
OperationTests.test_rename_m2m_field_with_2_references() test on Oracle.
|
|
ManyToManyField.through references on SQLite.
Thank you to dennisvang for the report and Jase Hackman for the test.
Co-authored-by: Jase Hackman <jase.hackman@zapier.com>
|
|
|
|
referencing rename field.
Thanks Sarah Boyce for the report and Simon Charette for the
implementation idea.
|
|
referenced by GeneratedField.expression.
Thank you to Simon Charette for the review.
|
|
|
|
|
|
|
|
Once the deprecation period ends CheckConstraint.check() can become the
documented method that performs system checks for BaseConstraint
subclasses.
|
|
|
|
Thanks Gerald Goh for the report.
|
|
optimizing migrations.
|
|
Field.db_default accepts either literal Python values or compilables
(as_sql) and wrap the former ones in Value internally.
While 1e38f11 added support for automatic resolving of output fields for
types such as str, int, float, and other unambigous ones it's cannot do
so for all types such as dict or even contrib.postgres and contrib.gis
primitives.
When a literal, non-compilable, value is provided it likely make the
most sense to bind its output field to the field its attached to avoid
forcing the user to provide an explicit `Value(output_field)`.
Thanks David Sanders for the report.
|
|
https://github.com/psf/black/releases/tag/24.1.0
|
|
each operation.
|
|
unique constraint on the same fields.
|
|
classes.
|
|
Regression in f333e3513e8bdf5ffeb6eeb63021c230082e6f95.t
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
|
|
Regression in f333e3513e8bdf5ffeb6eeb63021c230082e6f95.
|
|
Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
Regression in 7414704e88d73dafbcfbb85f9bc54cb6111439d3.
|
|
non-nullable.
|
|
|
|
|
|
functools.lru_cache in migrations.
`@functools.cache` and `@functools.lru_cache` return an object of type
`functools._lru_cache_wrapper` which prevented the migrations serializer from
working. Simply using the existing `FunctionTypeSerializer` for this additional
type works as expected.
|
|
Functions decorated with a decorator that is properly wrapped, e.g. by
using `@functools.wraps`, are already supported.
|
|
ForeignObject.from_fields/to_fields is not a tuple.
|
|
|
|
Thanks Adam Johnson and Paolo Melchiorre for reviews.
Co-Authored-By: Lily Foote <code@lilyf.org>
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
ChoiceField's choices.
|
|
dict_keys.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
with db_table.
|
|
db_table on SpatiaLite.
|
|
Co-authored-by: Nicolò <nicolo.intrieri@spinforward.it>
|
|
sets/frozensets in migrations.
Co-authored-by: Dakota Hawkins <dakotahawkins@gmail.com>
|
|
multiple queries when introspecting tables.
Thanks Tim Graham for the report and implementation idea.
Follow up to ea8cbca579cc6742e119747fc1eb6ecf90638bce.
|
|
exists.
|
|
Thanks David Sanders for the report.
|
|
Special thanks to Hannes Ljungberg for finding multiple implementation
gaps.
Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for
reviews.
|
|
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.
|