summaryrefslogtreecommitdiff
path: root/django/db/backends
AgeCommit message (Collapse)Author
2021-12-13Refs #33355 -- Fixed Trunc() with years < 1000 on SQLite.Adam Johnson
Thanks to Nick Pope for spotting the bug in Code Review. Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-12-10Refs #32502 -- Avoided table rebuild when adding fields with no default on ↵Mariusz Felisiak
SQLite.
2021-12-10Fixed DatabaseFeatures.requires_literal_defaults on SQLite.Mariusz Felisiak
This flag is currently unused on SQLite because it doesn't support dropping a DEFAULT clause, however it requires literal defaults, rather than parameterized ones, so we can set it for clarity.
2021-12-10Refs #32502 -- Added SchemaEditor.prepare_default() on SQLite.Mariusz Felisiak
2021-12-09Fixed #33340 -- Fixed unquoted column names in queries used by DatabaseCache.Arsa
2021-12-07Fixed #31765 -- Enforced enhanced ALTER TABLE behavior for SQLite connections.Adam Johnson
2021-12-03Fixed #33339 -- Made QuerySet.bulk_create() use TO_NCLOB() for TextFields on ↵Georgi Yanchev
Oracle.
2021-12-02Updated various links to HTTPS and new locations.Mariusz Felisiak
Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-12-01Fixed #30398 -- Added CONN_HEALTH_CHECKS database setting.Przemysław Suliga
The CONN_HEALTH_CHECKS setting can be used to enable database connection health checks for Django's persistent DB connections. Thanks Florian Apolloner for reviews.
2021-11-25Removed unneeded can_use_chunked_reads feature flag on SQLite.Mariusz Felisiak
Unneeded since c0e3c65b9d1b26cfc38137b7666ef0e108aab77f.
2021-11-24Removed unneeded supports_combined_alters feature flag on Oracle.Mariusz Felisiak
supports_combined_alters is False by default.
2021-11-19Fixed #33229 -- Fixed ↵SwastikTripathi
BaseDatabaseOperations.adapt_datetimefield_value()/adapt_timefield_value() crash with expressions.
2021-11-19Refs #24121 -- Added __repr__() to BaseDatabaseWrapper, JoinPromoter, and ↵Jonny Park
SQLCompiler.
2021-11-15Refs #33288 -- Removed SQLite's ↵Simon Charette
DatabaseIntrospection._get_foreign_key_constraints(). The get_relations() method returns the exact same data in a more generic format.
2021-11-15Fixed #33288 -- Made SQLite introspection use information schema for relations.Simon Charette
Previous solution was using brittle and complex parsing rules to extract them from the SQL used to define the tables. Removed a now unnecessary unit test that ensured the removed parsing logic accounted for optional spacing.
2021-11-15Refs #33288 -- Made SQLite introspection raise DatabaseError on nonexistent ↵Simon Charette
tables. All the other backends behave this way and we had to make adjustments to our test suite to account for this discrepancy. This also allows SQLite's get_relations() not to raise on a nonexistent table while making sure the InspectDBTestCase.test_introspection_errors test which ensures an error during introspection is surfaced in generated models files still passes.
2021-11-12Fixed #33161 -- Enabled durability check for nested atomic blocks in TestCase.Krzysztof Jagiello
Co-Authored-By: Adam Johnson <me@adamj.eu>
2021-11-12Fixed #33279 -- Fixed handling time zones with "-" sign in names.Can Sarigol
Thanks yakimka for the report. Regression in fde9b7d35e4e185903cc14aa587ca870037941b1.
2021-11-10Removed DatabaseIntrospection.get_key_columns().Mariusz Felisiak
Thanks Simon Charette for the report.
2021-11-10Fixed DatabaseIntrospection.get_relations() docstring.Tim Graham
The foreign keys are "in" the given table, not "to" it.
2021-11-02Fixed #32691 -- Made Exact lookup on BooleanFields compare directly to a ↵Roman
boolean value on MySQL. Performance regression in 37e6c5b79bd0529a3c85b8c478e4002fd33a2a1d. Thanks Todor Velichkov for the report. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-11-02Fixed #33224 -- Removed ↵Hasan Ramezani
DatabaseFeatures.supports_mixed_date_datetime_comparisons.
2021-10-28Fixed #33228 -- Changed value of ↵Chinmoy
BaseDatabaseFeatures.has_case_insensitive_like to False.
2021-10-26Fixed #32672 -- Fixed introspection of primary key constraints on SQLite.Anv3sh
Thanks Simon Charette for the implementation idea.
2021-10-22Fixed #33214 -- Added ↵Manaia Junior
BaseDatabaseOperations.format_for_duration_arithmetic() stub method.
2021-10-18Fixed #33194 -- Fixed migrations when altering a field with functional ↵Hannes Ljungberg
indexes/unique constraints on SQLite. This adjusts Expressions.rename_table_references() to only update alias when needed. Regression in 83fcfc9ec8610540948815e127101f1206562ead. Co-authored-by: Simon Charette <charettes@users.noreply.github.com>
2021-10-12Fixed #28401 -- Allowed hashlib.md5() calls to work with FIPS kernels.Ade Lee
md5 is not an approved algorithm in FIPS mode, and trying to instantiate a hashlib.md5() will fail when the system is running in FIPS mode. md5 is allowed when in a non-security context. There is a plan to add a keyword parameter (usedforsecurity) to hashlib.md5() to annotate whether or not the instance is being used in a security context. In the case where it is not, the instantiation of md5 will be allowed. See https://bugs.python.org/issue9216 for more details. Some downstream python versions already support this parameter. To support these versions, a new encapsulation of md5() has been added. This encapsulation will pass through the usedforsecurity parameter in the case where the parameter is supported, and strip it if it is not. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-10-01Refs #32943 -- Added support for covering SP-GiST indexes on PostgreSQL 14+.Nick Pope
2021-10-01Fixed #32961 -- Added BitXor() aggregate to django.contrib.postgres.Nick Pope
2021-10-01Fixed #33160 -- Avoided suppressing query errors in _nodb_cursor() on ↵Daniel Hahler
PostgreSQL.
2021-09-28Fixed #33125 -- Avoided redundant unique constraint when converting a ↵Jordan Bae
non-unique field to primary key on MySQL and PostgreSQL.
2021-09-22Fixed #33129 -- Dropped support for MariaDB 10.2.Mariusz Felisiak
2021-09-16Fixed #32365 -- Made zoneinfo the default timezone implementation.Carlton Gibson
Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick Pope, and Paul Ganssle for reviews.
2021-09-01Fixed #33080 -- Preserved nullability of textual fields on Oracle.Mariusz Felisiak
Thanks Matt Hoskins for the report.
2021-08-31Fixed #33057 -- Fixed recreation of foreign key constraints in m2m tables ↵Mariusz Felisiak
when altering type of referenced primary key on Oracle.
2021-08-24Refs #10929 -- Allowed NowUTC SQL customization for third-party backends.Tim Graham
2021-08-20Fixed #33017 -- Fixed storage engine introspection on MySQL.Matjaz Gregoric
This also improves performance on MySQL instances with a large number of databases, since querying the information_schema table can be very slow
2021-08-20Optimized DatabaseSchemaEditor._field_should_be_indexed() on MySQL.Matjaz Gregoric
2021-07-28Optimized BaseDatabaseSchemaEditor._effective_default() a bit,Chris Jerdonek
This eliminates an unneeded call to datetime.now() when field.get_internal_type() equals "DateTimeField".
2021-07-27Refs #32962 -- Simplified NULL logic in ↵Chris Jerdonek
BaseDatabaseSchemaEditor._iter_column_sql().
2021-07-27Fixed #32962 -- Consolidated string concatenations in ↵Chris Jerdonek
BaseDatabaseSchemaEditor.column_sql().
2021-07-27Refs #32956 -- Changed "afterwards" to "afterward" in docs and comments.David Smith
This also removes unnecessary comments with the previous spelling. AP Stylebook has a short entry to advise the preferred spelling for "en-us". "Afterwards" is preferred in British English.
2021-07-27Refs #32743 -- Fixed recreation of foreign key constraints when altering ↵Jordan Bae
type of referenced primary key with MTI. Follow up to 325d7710ce9f6155bb55610ad6b4580d31263557.
2021-07-26Fixed #32743 -- Added foreign key altering when altering type of referenced ↵David Wobrock
primary key with MTI.
2021-07-19Fixed #10929 -- Added default argument to aggregates.Nick Pope
Thanks to Simon Charette and Adam Johnson for the reviews.
2021-07-09Fixed #27021 -- Allowed lookup expressions in annotations, aggregations, and ↵Ian Foote
QuerySet.filter(). Thanks Hannes Ljungberg and Simon Charette for reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-08Fixed #32908 -- Allowed select_for_update(skip_locked) on MariaDB 10.6+.Mariusz Felisiak
2021-07-07Fixed inspectdb and schema tests on MariaDB 10.6+.Mariusz Felisiak
The utf8 character set (and related collations) is by default an alias for utf8mb3 on MariaDB 10.6+.
2021-07-05Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using "assert".Mateo Radman
2021-07-02Fixed #30934 -- Included database alias in django.db.backends log messages.Nick Pope
This is useful when working with database routing as you want to know where each query is being executed. Co-authored-by: David Winterbottom <david.winterbottom@gmail.com>