summaryrefslogtreecommitdiff
path: root/django/db/backends/sqlite3
AgeCommit message (Collapse)Author
2025-10-29[6.0.x] Fixed #36596 -- Made parallel test runner respect django_test_skips ↵Mariusz Felisiak
and django_test_expected_failures. Backport of 9ba3f74a46d15f9f2f45ad4ef8cdd245a888e58e from main.
2025-09-22[6.0.x] Fixed #35453 -- Made ManyToManyField.concrete False.Ryan P Kilby
ManyToManyField was already excluded from fields, concrete_fields, and local_concrete_fields in Options. Backport of f9a44cc0fac653f8e0c2ab1cdfb12b2cc5c63fc2 from main
2025-09-14Refs #27222 -- Refreshed GeneratedFields values on save() initiated update.Simon Charette
This required implementing UPDATE RETURNING machinery that heavily borrows from the INSERT one.
2025-08-28Refs #27222 -- Implemented ↵Simon Charette
BaseDatabaseOperations.return_insert_columns()/fetch_returned_insert_rows().
2025-08-21Fixed #36430 -- Removed artificially low limit on single field bulk ↵Jacob Walls
operations on SQLite.
2025-08-12Remove unused OneToOneField from DatabaseWrapper.data_types.Tim Graham
OneToOneField uses the type of the related field.
2025-07-29Fixed #36531 -- Added forkserver support to parallel test runner.Mariusz Felisiak
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-05-20Fixed #34262 -- Added support for AnyValue for SQLite, MySQL, Oracle, and ↵ontowhee
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.
2025-05-14Fixed #36085 -- Added JSONField support for negative array indexing on SQLite.savanto
2025-05-08Fixed #36143 -- Made max_query_params respect SQLITE_LIMIT_VARIABLE_NUMBER.Sage Abdullah
Co-authored-by: Xavier Frankline <xf.xavierfrank@gmail.com>
2025-04-30Fixed #36358 -- Corrected introspection of composite primary keys on SQLite.Simon Charette
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.
2025-04-30Refs #36052, #32234 -- Removed create_test_table_with_composite_primary_key ↵Simon Charette
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.
2025-03-31Refs #28909 -- Simplified code using unpacking generalizations.Aarni Koskela
2025-03-09Fixed #35487 -- Removed CASCADE from RemoveField() on PostgreSQL.petr.prikryl
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>
2025-03-03Fixed #35444 -- Added generic support for Aggregate.order_by.Chris Muthig
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.
2025-02-09Fixed #36148 -- Enabled native tuple comparison lookups on SQLite 3.37+ and ↵Simon Charette
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.
2025-02-09Refs #36148 -- Relied on a feature switch to define tuple lookups support.Simon Charette
This should allow backends more easily opt-in or out of native support and rely on the fallback if unavailable.
2025-01-29Fixed #36118 -- Accounted for multiple primary keys in bulk_update ↵Sarah Boyce
max_batch_size. Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-01-10Refs #36064 -- Added Model.has_db_default() to encapsulate NOT_PROVIDED checks.Simon Charette
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.
2024-12-16Refs #35842 -- Fixed test_lookups_special_chars_double_quotes on SQLite 3.47+.Sage Abdullah
2024-12-03Refs #35842 -- Fixed handling of quotes in JSONField key lookups on Oracle.Sage Abdullah
2024-11-29Fixed #373 -- Added CompositePrimaryKey.Bendeguz Csirmaz
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>
2024-11-11Fixed typo in django/db/backends/sqlite3/features.py.Mariusz Felisiak
2024-09-17Fixed #35762 -- Avoided unneeded quote_name() calls in SQLite introspection.Claude Paroz
Double-quoting string literals is deprecated in recent SQLite versions. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2024-09-16Fixed #34887 -- Added support for unlimited models.CharField on SQLite.saJaeHyukc
Signed-off-by: saJaeHyukc <wogur981208@gmail.com>
2024-04-29Fixed #35412 -- Dropped support for SQLite < 3.31.Mariusz Felisiak
2024-04-16Fixed #35373 -- Fixed a crash when indexing a generated field on SQLite.Simon Charette
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.
2024-03-14Fixed #28541 -- Fixed migrations crash when changing primary key on SQLite.Ben Cail
2024-03-14Refs #35295 -- Added BaseDatabaseOperations.bulk_insert_sql().Mariusz Felisiak
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2024-03-06Fixed #35021 -- Fixed capturing queries when using client-side parameters ↵Michail Chatzis
binding with psycopg 3+.
2024-02-16Fixed #24018 -- Allowed setting pragma options on SQLite.Aaron Linville
2024-02-15Fixed #33037 -- Fixed Trunc() with offset timezones on MySQL, SQLite, Oracle.Shafiya Adzhani
2024-01-30Fixed #29280 -- Made the transactions behavior configurable on SQLite.Anže Pečar
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2024-01-16Fixed #35111 -- Fixed compilation of DateField __in/__range rhs on SQLite ↵Simon Charette
and MySQL. Also removed tests that ensured that adapt_(date)timefield backend operations where able to deal with expressions when it's not the case for any other adapt methods.
2023-11-30Fixed #35006 -- Fixed migrations crash when altering Meta.db_table_comment ↵Mariusz Felisiak
on SQLite. Thanks Юрий for the report. Regression in 78f163a4fb3937aca2e71786fbdd51a0ef39629e.
2023-11-22Fixed #34984 -- Skipped GeneratedFields when remaking tables on SQLite.Sarah Boyce
Regression in f333e3513e8bdf5ffeb6eeb63021c230082e6f95.t Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
2023-11-13Fixed #34967 -- Fixed queryset crash when grouping by constants on SQLite < ↵David Sanders
3.39. On SQLite < 3.39, this forces a GROUP BY clause with a HAVING clause when no grouping is specified. Co-authored-by: Simon Charette <charette.s@gmail.com>
2023-11-02Refs #31300 -- Allowed testing GeneratedField without collation.Tim Graham
CockroachDB and Snowflake don't support it.
2023-10-30Refs #29850 -- Added exclusion support to window frames.Sarah Boyce
2023-09-25Refs #34825 -- Made SQLite backend open source database in readonly mode ↵David Sanders
when using spawn.
2023-09-18Refs #27236 -- Removed Meta.index_together per deprecation timeline.Mariusz Felisiak
2023-09-07Fixed #31300 -- Added GeneratedField model field.Jeremy Nauta
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>
2023-08-20Fixed DatabaseCreation.get_test_db_clone_settings() for empty database name ↵Mariusz Felisiak
on SQLite. Empty string should be considered an in-memory SQLite database.
2023-08-04Fixed #34760 -- Dropped support for SQLite < 3.27.Mariusz Felisiak
2023-05-12Fixed #470 -- Added support for database defaults on fields.Ian Foote
Special thanks to Hannes Ljungberg for finding multiple implementation gaps. Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for reviews.
2023-05-09Moved SQLite DatabaseSchemaEditor.add_field()'s comment to the correct line.Mariusz Felisiak
2023-05-05Refs #27236 -- Made more cosmetic edits to Meta.index_together deprecation.Mariusz Felisiak
2023-03-08Fixed #34370 -- Added integer fields validation as 64-bit on SQLite.nabil-rady