summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/schema.py
AgeCommit message (Collapse)Author
2022-12-12Refs #33308 -- Moved psycopg2 imports to the psycopg_any module.Florian Apolloner
2022-10-01Refs #34058 -- Fixed changing/deleting sequences when altering pre-Django ↵Mariusz Felisiak
4.1 auto fields on PostgreSQL. Thanks Anders Kaseorg for the report. Follow up to 19e6efa50b603af325e7f62058364f278596758f. Regression in 2eea361eff58dd98c409c5227064b901f41bd0d6.
2022-09-29Fixed #34058 -- Changed sequence types when altering pre-Django 4.1 auto ↵Mariusz Felisiak
fields on PostgreSQL. Thanks Anders Kaseorg for the report. Thanks Florian Apolloner for pair programming. Regression in 2eea361eff58dd98c409c5227064b901f41bd0d6.
2022-09-25Fixed #34027 -- Fixed migrations crash when altering type of char/text ↵David Sanders
fields referenced by foreign key on PostgreSQL.
2022-08-17Fixed #33932 -- Fixed altering AutoFields to OneToOneField on PostgreSQL.Benoît Vinot
Regression in 2eea361eff58dd98c409c5227064b901f41bd0d6.
2022-08-15Fixed #33901 -- Skipped varchar_pattern_ops/text_pattern_ops index creation ↵Haolun Chai
when db_collation is set.
2022-08-02Fixed #33881 -- Added support for database collations to ↵Mariusz Felisiak
ArrayField(Char/TextFields).
2022-05-04Fixed #25105 -- Checked deferred constraints before updating rows on PostgreSQL.David Wobrock
2022-04-13Fixed #30511 -- Used identity columns instead of serials on PostgreSQL.Florian Apolloner
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-01-13Fixed #26167 -- Added support for functional indexes.Hannes Ljungberg
Thanks Simon Charette, Mads Jensen, and Mariusz Felisiak for reviews. Co-authored-by: Markus Holtermann <info@markusholtermann.eu>
2020-12-23Refs #26167 -- Made DatabaseSchemaEditor._create_index_sql()'s fields ↵Hannes Ljungberg
argument optional and kwarg-only.
2020-08-24Fixed #24533 -- Dropped PostgreSQL sequence and Oracle identity when ↵Tim Graham
migrating away from AutoField.
2020-07-27Fixed #31815 -- Fixed schema value encoding on PostgreSQL.Mariusz Felisiak
2020-06-24Fixed #31735 -- Fixed migrations crash on namespaced inline FK addition on ↵Simon Charette
PostgreSQL. The namespace of the constraint must be included when making the constraint immediate. Regression in 22ce5d0031bd795ade081394043833e82046016c. Thanks Rodrigo Estevao for the report.
2020-06-04Fixed #30913 -- Added support for covering indexes on PostgreSQL 11+.Hannes Ljungberg
2019-12-23Fixed #31106 -- Fixed migrations crash on PostgreSQL 10+ when adding FK ↵Mariusz Felisiak
constraints inline and changing data. This allows adding foreign key constraints inline and changing data in the same migration on PostgreSQL 10+. Regression in 738faf9da2a5cd03148a36375db80746c99c9623. Thanks Janne Rönkkö for the report and Simon Charette for the implementation idea and review.
2019-10-17Refs #28816 -- Prevented silencing data loss when decreasing ↵Hasan Ramezani
CharField.max_length for ArrayField.base_field on PostgreSQL.
2019-09-25Fixed #30800 -- Fixed migrations crash when altering a field with custom ↵Mariusz Felisiak
db_type(). Regression in 1378d665a1c85897d951f2ca9618b848fdbba2e7.
2019-08-21Fixed #21039 -- Added AddIndexConcurrently/RemoveIndexConcurrently ↵Mads Jensen
operations for PostgreSQL. Thanks to Simon Charettes for review. Co-Authored-By: Daniel Tao <daniel.tao@gmail.com>
2019-08-02Fixed #30661 -- Added models.SmallAutoField.Nick Pope
2019-08-01Refs #30664 -- Fixed migrations crash when altering AutoField/BigAutoField ↵Mariusz Felisiak
with quoted db_column on PostgreSQL.
2019-08-01Fixed #30664 -- Fixed migrations crash when altering table on SQLite or ↵Ngalim Siregar
altering AutoField/BigAutoField on PostgreSQL for models with quoted db_table.
2019-05-21Fixed #28816 -- Prevented silencing data loss when decreasing ↵Hasan Ramezani
CharField.max_length on PostgreSQL.
2019-04-30Fixed #30408 -- Fixed crash when adding check constraints with LIKE operator ↵Simon Charette
on Oracle and PostgreSQL. The LIKE operator wildcard generated for contains, startswith, endswith and their case-insensitive variant lookups was conflicting with parameter interpolation on CREATE constraint statement execution. Ideally we'd delegate parameters interpolation in DDL statements on backends that support it but that would require backward incompatible changes to the Index and Constraint SQL generating methods. Thanks David Sanders for the report.
2019-04-08Fixed #30266 -- Kept a sequence owner when altering an ↵Dolan Antenucci
AutoField/BigAutoField on PostgreSQL.
2019-03-28Fixed "byte string" typo in various docs and comments.Mariusz Felisiak
2019-03-18Fixed #30258 -- Adjusted postgres schema value quoting of ranges.Simon Charette
Thanks Tilman Koschnick for the report and patch.
2019-01-29Fixed #30108 -- Allowed adding foreign key constraints in the same statement ↵Dan Tao
that adds a field.
2019-01-01Fixed #30060 -- Moved SQL generation for indexes and constraints to ↵Paveł Tyślacki
SchemaEditor.
2018-10-29Fixed #29547 -- Added support for partial indexes.Mads Jensen
Thanks to Ian Foote, Mariusz Felisiak, Simon Charettes, and Markus Holtermann for comments and feedback.
2018-06-29Fixed #28077 -- Added support for PostgreSQL opclasses in Index.Ian Foote
Thanks Vinay Karanam for the initial patch.
2017-11-29Fixed #28702 -- Made query lookups for CIText fields use citext.Mads Jensen
2017-08-08Refs #23766 -- Added tests for CursorWrapper.callproc().Mariusz Felisiak
Thanks Tim Graham for the review.
2017-06-20Refs #25530 -- Changed _create_index_name to take a table as first parameter.Simon Charette
2017-06-06Fixed #28275 -- Added more hooks to SchemaEditor._alter_field().Florian Apolloner
2017-05-24Fixed #27860 -- Dropped varchar_pattern_ops/text_pattern_ops index before ↵Mariusz Felisiak
altering char/text field in PostgreSQL. Thanks Tim Graham for the review.
2017-03-03Refs #27860 -- Simplified deleting indexes on PostgreSQL using "IF EXISTS".Mariusz Felisiak
2017-02-28Refs #27656 -- Updated django.db docstring verbs according to PEP 257.Anton Samarchyan
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2016-12-24Fixed #25492 -- Checked deferred foreign key constraints before dropping them.Simon Charette
This allows running foreign key data and schema altering operations in the same migration on PostgreSQL. Thanks Tim for review.
2016-08-12Fixed #27030 -- Added contrib.postgres.indexes.GinIndex.Akshesh
2016-07-15Refs #26889 -- Refactored SchemaEditor to allow backend specific indexes.Jon Dufresne
2016-07-13Fixed #26889 -- Fixed missing PostgreSQL index in SchemaEditor.add_field().Jon Dufresne
2016-07-07Fixed #25317, #26090 -- Fixed swapping combinations of unique and db_index ↵Jon Dufresne
during migrations.
2016-01-08Fixed #26034 -- Fixed incorrect index handling on PostgreSQL on ↵Tim Graham
Char/TextField with unique=True and db_index=True. Thanks Simon Charette for review.
2015-12-25Fixed #14286 -- Added models.BigAutoField.Alexander Sosnovskiy
2015-12-10Fixed #25412 -- Fixed missing PostgreSQL index on Char/TextField when using ↵Federico Frenguelli
AlterField. Thanks to Emanuele Palazzetti for the help.
2015-08-15Fixed #25180 -- Prevented varchar_patterns_ops and text_patterns_ops indexes ↵Caio Ariede
for ArrayField.