| Age | Commit message (Collapse) | Author |
|
Schema dependency discovery treated to_field values as raw field names, so attname aliases such as "primary_id" were not matched to the underlying relation field "primary". As a result, AlterField on a unique target field updated direct dependencies but missed transitive attname-based references.
Resolved the dependency matching by comparing resolved remote fields rather than only field names, and updated SQLite's related-table rebuild path to use the same recursive dependency discovery.
Added a regression test covering a transitive relation chain where
ForeignKey(..., to_field="primary_id") must widen along with the unique leaf field it ultimately references.
|
|
|
|
on SQLite.
The "spawn" and "forkserver" multiprocessing modes were affected.
|
|
`DatabaseOperations.check_expression_support()`.
|
|
Avoided reconstructing the same tuples on every call by defining them as module-level constants.
|
|
Co-authored-by: Simon Charette <charette.s@gmail.com>
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
https://github.com/psf/black/releases/tag/26.1.0
|
|
|
|
Regression in 358fd21c47cdf7bda520ce73c5cfd82bba57827b.
|
|
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
Thanks Lily for the review.
|
|
|
|
|
|
django_test_expected_failures.
|
|
|
|
Thanks Simon Charette for pair programming.
Co-authored-by: Nick Stefan <NickStefan12@gmail.com>
Co-authored-by: Akash Kumar Sen <71623442+Akash-Kumar-Sen@users.noreply.github.com>
Co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
ManyToManyField was already excluded from fields, concrete_fields,
and local_concrete_fields in Options.
|
|
This required implementing UPDATE RETURNING machinery that heavily
borrows from the INSERT one.
|
|
BaseDatabaseOperations.return_insert_columns()/fetch_returned_insert_rows().
|
|
operations on SQLite.
|
|
OneToOneField uses the type of the related field.
|
|
|
|
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
|
|
Postgresql 16+.
Thanks Simon Charette for the guidance and review. Thanks Tim Schilling for the
documentation review. Thanks David Wobrock for investigation and solution proposals.
|
|
|
|
Co-authored-by: Xavier Frankline <xf.xavierfrank@gmail.com>
|
|
Previously, any first field of a composite primary key with type
`INTEGER` was incorrectly introspected as an `AutoField` due to SQLite
treating `INTEGER PRIMARY KEY` as an alias for the `ROWID`.
This change ensures that integer fields in composite PKs are not
mistaken for auto-incrementing fields.
Thanks Jacob Walls and Sarah Boyce for the reviews.
|
|
flag in favor of using CompositePrimaryKey.
Now that Django properly supports creating models with composite primary
keys, the tests should use a `CompositePrimaryKey` field instead of a
feature flag to inline backend specific SQL for creating a composite PK.
Specifcially, the inspectdb's test_composite_primary_key was adjusted to
use schema editor instead of per-backend raw SQL.
|
|
|
|
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Adam Johnson <me@adamj.eu>
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
|
|
This moves the behaviors of `order_by` used in Postgres aggregates into
the `Aggregate` class. This allows for creating aggregate functions that
support this behavior across all database engines. This is shown by
moving the `StringAgg` class into the shared `aggregates` module and
adding support for all databases. The Postgres `StringAgg` class is now
a thin wrapper on the new shared `StringAgg` class.
Thank you Simon Charette for the review.
|
|
Oracle 23.4+.
VALUES must be explicitly specified when declaring a sequence of tuples
on SQLite < 3.37 but it's not required on >= 3.37.
See sqlite/sqlite@9289f51 which addressed the last remaining issue with
IN.
|
|
This should allow backends more easily opt-in or out of native support and rely
on the fallback if unavailable.
|
|
max_batch_size.
Co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
This avoids many awkward checks against NOT_PROVIDED and provides symmetry
with Field.has_default() which is also the reason why it wasn't made a
property.
|
|
|
|
|
|
Thanks Lily Foote and Simon Charette for reviews and mentoring
this Google Summer of Code 2024 project.
Co-authored-by: Simon Charette <charette.s@gmail.com>
Co-authored-by: Lily Foote <code@lilyf.org>
|
|
|
|
Double-quoting string literals is deprecated in recent SQLite versions.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
Signed-off-by: saJaeHyukc <wogur981208@gmail.com>
|
|
|
|
Generated fields have to be excluded from the INSERT query against the remade
table including the index.
Thanks Moshe Dicker for the report, David Sanders and Mariusz Felisiak for the
review.
|
|
|
|
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
|
|
binding with psycopg 3+.
|
|
|
|
|
|
|
|
https://github.com/psf/black/releases/tag/24.1.0
|