summaryrefslogtreecommitdiff
path: root/django/db/backends/base
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #470 -- Added support for database defaults on fields.Ian Foote2023-05-122-7/+93
| | | | | | | | Special thanks to Hannes Ljungberg for finding multiple implementation gaps. Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for reviews.
* Refs #27236 -- Made more cosmetic edits to Meta.index_together deprecation.Mariusz Felisiak2023-05-051-0/+1
|
* Fixed #33759 -- Avoided unnecessary subquery in QuerySet.delete() with ↵4the4ryushin2023-05-011-0/+3
| | | | self-referential subqueries if supported.
* Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation ↵David Wobrock2023-04-181-0/+7
| | | | relation on PostgreSQL.
* Refs #34320 -- Stopped recreating check constraints when renaming fields.Mariusz Felisiak2023-03-021-2/+15
| | | | | This also fixes test_rename_field_with_check_to_truncated_name() on MariaDB 10.5.2+ as ALTER TABLE ... RENAME COLUMN statement doesn't rename inline constraints.
* Refs #30060, Refs #34217 -- Made SchemaEditor not generate SQL for ↵Mariusz Felisiak2023-02-231-0/+2
| | | | | | | | CheckConstraint if not supported. The new logic mirrors the logic in SchemaEditor._delete_check_sql() added in 68ef274bc505cd44f305c03cbf84cf08826200a8. Thanks Tim Graham for the report.
* Fixed #34320 -- Make sure constraints names are obtained from truncated ↵nabil-rady2023-02-151-2/+6
| | | | columns names.
* Refs #33476 -- Applied Black's 2023 stable style.David Smith2023-02-012-0/+2
| | | | | | | | Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
* Fixed #34233 -- Dropped support for Python 3.8 and 3.9.Mariusz Felisiak2023-01-181-7/+2
|
* Refs #32365 -- Removed support for pytz timezones per deprecation timeline.Mariusz Felisiak2023-01-171-10/+1
|
* Fixed #34176 -- Fixed grouping by ambiguous aliases.Simon Charette2023-01-091-1/+1
| | | | | | | | | | | | | | | Regression in b7b28c7c189615543218e81319473888bc46d831. Refs #31377. Thanks Shai Berger for the report and reviews. test_aggregation_subquery_annotation_values_collision() has been updated as queries that are explicitly grouped by a subquery should always be grouped by it and not its outer columns even if its alias collides with referenced table columns. This was not possible to accomplish at the time 10866a10 landed because we didn't have compiler level handling of colliding aliases.
* Fixed #14094 -- Added support for unlimited CharField on PostgreSQL.Adrian Torres2022-12-281-0/+3
| | | | Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #18468 -- Added support for comments on columns and tables.kimsoungryoul2022-12-282-4/+92
| | | | | | | | Thanks Jared Chung, Tom Carrick, David Smith, Nick Pope, and Mariusz Felisiak for reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Nick Pope <nick@nickpope.me.uk>
* Fixed #34217 -- Fixed migration crash when removing check constraints on ↵DevilsAutumn2022-12-271-0/+2
| | | | MySQL < 8.0.16.
* Fixed #34219 -- Preserved Char/TextField.db_collation when altering column type.Mariusz Felisiak2022-12-221-44/+28
| | | | | | | This moves setting a database collation to the column type alteration as both must be set at the same time. This should also avoid another layer of the column type alteration when adding database comments support (#18468).
* Fixed #33308 -- Added support for psycopg version 3.Daniele Varrazzo2022-12-152-0/+8
| | | | | | | Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews. Co-authored-by: Florian Apolloner <florian@apolloner.eu> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #31090 -- Logged transaction management queries.Ilya Bass2022-11-211-4/+8
| | | | | Thanks to Petter Strandmark for the original idea and Mariusz Felisiak for advice during the DjangoConUS 2022 Sprint!
* Refs #33308 -- Used get_db_prep_value() to adapt JSONFields.Simon Charette2022-11-151-0/+4
|
* Refs #17144 -- Removed support for grouping by primary key.Simon Charette2022-11-071-1/+0
| | | | | No core backend require the feature anymore as it was only added to support a MySQL'ism that has been deprecated since then.
* Used more augmented assignment statements.Nick Pope2022-10-311-1/+1
| | | | | | Identified using the following command: $ git grep -I '\(\<[_a-zA-Z0-9]\+\>\) *= *\1 *[-+/*^%&|<>@]'
* Refs #33308 -- Enabled explicit GROUP BY and ORDER BY aliases.Simon Charette2022-10-061-0/+1
| | | | | | | This ensures explicit grouping from using values() before annotating an aggregate function groups by selected aliases if supported. The GROUP BY feature is disabled on Oracle because it doesn't support it.
* Fixed #33768 -- Fixed ordering compound queries by nulls_first/nulls_last on ↵Simon Charette2022-10-051-0/+1
| | | | | | | | | | | MySQL. Columns of the left outer most select statement in a combined query can be referenced by alias just like by index. This removes combined query ordering by column index and avoids an unnecessary usage of RawSQL which causes issues for backends that specialize the treatment of null ordering.
* Fixed #23353 -- Used "raise from" when raising TransactionManagementError.David Wobrock2022-10-031-1/+2
| | | | This change sets the __cause__ attribute to raised exceptions.
* Fixed #33996 -- Fixed CheckConstraint validation on NULL values.David Sanders2022-09-131-0/+3
| | | | | | Bug in 667105877e6723c6985399803a364848891513cc. Thanks James Beith for the report.
* Fixed #33982 -- Fixed migrations crash when adding model with ↵James Beith2022-09-071-1/+3
| | | | | | ExclusionConstraint. Regression in 0e656c02fe945389246f0c08f51c6db4a0849bd2.
* Refs #33616 -- Updated BaseDatabaseWrapper.run_on_commit comment.DevilsAutumn2022-09-061-2/+3
|
* Fixed #33616 -- Allowed registering callbacks that can fail in ↵SirAbhi132022-09-061-6/+32
| | | | | | transaction.on_commit(). Thanks David Wobrock and Mariusz Felisiak for reviews.
* Fixed #33919 -- Fixed adding AutoFields on PostgreSQL.Mariusz Felisiak2022-08-121-0/+2
| | | | | Thanks Jack Calvin Brown for the report. Regression in 2eea361eff58dd98c409c5227064b901f41bd0d6.
* Fixed #33881 -- Added support for database collations to ↵Mariusz Felisiak2022-08-021-2/+5
| | | | ArrayField(Char/TextFields).
* Refs CVE-2022-34265 -- Properly escaped Extract() and Trunc() parameters.Simon Charette2022-07-061-12/+9
| | | | Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed CVE-2022-34265 -- Protected Trunc(kind)/Extract(lookup_name) against ↵Mariusz Felisiak2022-07-041-0/+3
| | | | | | SQL injection. Thanks Takuto Yoshikai (Aeye Security Lab) for the report.
* Fixed #33773 -- Made Index with multiple fields respect ↵Bruce Cutler2022-06-131-0/+3
| | | | | | DEFAULT_INDEX_TABLESPACE. Thanks to Simon Charette for locating where issue lay.
* Fixed #32234 -- Made inspectdb inform about composite primary keys.Anv3sh2022-06-012-1/+10
|
* Fixed #23740 -- Fixed removing unique_together constraint if exists primary ↵David Wobrock2022-05-261-1/+15
| | | | key/unique constraint on the same field.
* Refs #23740 -- Added BaseDatabaseSchemaEditor._unique_constraint_name().David Wobrock2022-05-261-4/+12
|
* Refs #27064 -- Added RenameIndex migration operation.David Wobrock2022-05-122-0/+22
|
* Fixed #29854 -- Made _all_related_fields() return deterministically ordered ↵Collin Anderson2022-05-031-5/+10
| | | | | | fields. Thanks to Rick Yang and Baptiste Mispelon for the investigation.
* Fixed #33413 -- Made migrations propage collations to related fields.David Wobrock2022-05-021-6/+19
|
* Refs #33413 -- Added collation to CharField/TextField's db_parameters.David Wobrock2022-04-291-8/+14
|
* Expanded QuerySet.explain() error message if a backend supports no formats.Tim Graham2022-04-141-0/+4
|
* Fixed #30511 -- Used identity columns instead of serials on PostgreSQL.Florian Apolloner2022-04-131-1/+4
|
* Removed DatabaseFeatures.validates_explain_options.Mariusz Felisiak2022-04-111-4/+0
| | | Always True since 6723a26e59b0b5429a0c5873941e01a2e1bdbb81.
* Fixed #33471 -- Made AlterField operation a noop when changing "choices".sarahboyce2022-04-061-15/+2
| | | | | This also allows customizing attributes of fields that don't affect a column definition.
* Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson2022-03-241-2/+2
| | | | | Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
* Fixed #29865 -- Added logical XOR support for Q() and querysets.Ryan Heard2022-03-041-0/+3
|
* Refs #31169 -- Prevented infinite loop in tests on failures.Mariusz Felisiak2022-03-041-1/+0
| | | Regression in ae91ecf6a1037fb67d14841b66ac19d4c2ccc4ac.
* Refs #31169 -- Added DatabaseCreation.setup_worker_connection() hook.Valz2022-02-231-0/+10
|
* Fixed #33379 -- Added minimum database version checks.Hasan Ramezani2022-02-182-5/+31
| | | | Thanks Tim Graham for the review.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-074-21/+44
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-078-529/+927
|