Simon Charette
dfc77637ea
Fixed #35162 -- Fixed crash when adding fields with db_default on MySQL.
...
MySQL doesn't allow literal DEFAULT values to be used for BLOB, TEXT,
GEOMETRY or JSON columns and requires expression to be used instead.
Regression in 7414704e88
.
2024-02-03 22:47:40 +01:00
Mariusz Felisiak
305757aec1
Applied Black's 2024 stable style.
...
https://github.com/psf/black/releases/tag/24.1.0
2024-01-26 12:45:07 +01:00
Tobias Krönke
4b7fe146cc
Refs #32503 -- Added assertion for effective default value when altering TextField to non-nullable with default.
2023-12-14 10:53:37 +01:00
Mariusz Felisiak
fcf95e5927
Fixed #35018 -- Fixed migrations crash on GeneratedField with BooleanField as output_field on Oracle < 23c.
...
Thanks Václav Řehák for the report.
Regression in f333e3513e
.
2023-12-12 05:39:11 +01:00
Peter Thomassen
54cb1a7e16
Fixed #35002 -- Made UniqueConstraints with fields respect nulls_distinct.
...
Regression in 595a2abb58
.
2023-12-03 12:30:45 +01:00
Mariusz Felisiak
37fc832a54
Fixed #35006 -- Fixed migrations crash when altering Meta.db_table_comment on SQLite.
...
Thanks Юрий for the report.
Regression in 78f163a4fb
.
2023-11-30 10:10:27 +01:00
Mariusz Felisiak
5875f03ce6
Fixed #34944 -- Made GeneratedField.output_field required.
...
Regression in f333e3513e
.
2023-11-14 20:22:07 +01:00
Mariusz Felisiak
de4884b114
Reverted "Refs #30446 , Refs #34944 -- Fixed crash when adding GeneratedField with string Value()."
...
This reverts commit 8b1acc0440
.
2023-11-14 15:45:43 +01:00
Simon Charette
8b1acc0440
Refs #30446 , Refs #34944 -- Fixed crash when adding GeneratedField with string Value().
...
This should allow smarter output_field inferring in functions dealing
with text expressions.
Regression in f333e3513e
.
2023-11-08 15:48:15 +03:00
Simon Charette
8a28e983df
Fixed #34946 -- Preserved db_default on combined default field addition.
...
Regression in 7414704e88
.
2023-11-07 13:32:34 +03:00
Tom Carrick
34b411762b
Fixed #34932 -- Restored varchar_pattern_ops/text_pattern_ops index creation when deterministic collaction is set.
...
Regression in f3f9d03edf
(4.2) and
8ed25d65ea
(5.0).
2023-10-30 07:37:40 +01:00
Paolo Melchiorre
e7e8eb44a3
Fixed #34877 -- Fixed migrations crash when adding GeneratedField with output_field with params.
2023-09-28 05:50:42 +02:00
Paolo Melchiorre
574ee4023e
Fixed #34861 -- Fixed crash when adding GeneratedField with some expressions.
...
Co-authored-by: Simon Charette <charette.s@gmail.com>
2023-09-22 21:01:54 +02:00
Mariusz Felisiak
2abf417c81
Refs #27236 -- Removed Meta.index_together per deprecation timeline.
2023-09-18 22:12:40 +02:00
Mariusz Felisiak
2b582387d5
Fixed #34760 -- Dropped support for SQLite < 3.27.
2023-08-04 06:35:13 +02:00
Mariusz Felisiak
22b0b73c77
Fixed warnings per flake8 6.1.0.
2023-07-30 16:17:07 +02:00
Simon Charette
595a2abb58
Fixed #34701 -- Added support for NULLS [NOT] DISTINCT on PostgreSQL 15+.
2023-07-19 21:42:27 +02:00
Ian Foote
7414704e88
Fixed #470 -- Added support for database defaults on fields.
...
Special thanks to Hannes Ljungberg for finding multiple implementation
gaps.
Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for
reviews.
2023-05-12 19:11:40 +02:00
Petter Friberg
8ed25d65ea
Fixed #34505 -- Skipped varchar_pattern_ops/text_pattern_ops index creation when db_collation is set in related field.
2023-04-21 10:31:22 +02:00
Mariusz Felisiak
765b96734c
Added SchemaTests._add_ci_collation() hook.
2023-04-21 10:00:09 +02:00
Tim Graham
40e88ae8c8
Refs #34320 -- Added skipIf for a test requiring check constraints.
2023-02-24 06:00:00 +01:00
nabil-rady
6bdc3c58b6
Fixed #34320 -- Make sure constraints names are obtained from truncated columns names.
2023-02-15 16:51:31 +01:00
David Smith
097e3a70c1
Refs #33476 -- Applied Black's 2023 stable style.
...
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
2023-02-01 11:04:38 +01:00
sage
110b3b8356
Fixed #34304 -- Made MySQL's SchemaEditor.remove_constraint() don't create foreign key index when unique constraint is ignored.
...
Regression in b731e88415
.
2023-01-31 11:52:07 +01:00
kimsoungryoul
78f163a4fb
Fixed #18468 -- Added support for comments on columns and tables.
...
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>
2022-12-28 06:28:07 +01:00
Mariusz Felisiak
ae0899be0d
Fixed #34219 -- Preserved Char/TextField.db_collation when altering column type.
...
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 ).
2022-12-22 07:12:17 +01:00
Daniele Varrazzo
09ffc5c121
Fixed #33308 -- Added support for psycopg version 3.
...
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>
2022-12-15 06:17:57 +01:00
Mariusz Felisiak
7b0e9ea53c
Fixed #34138 -- Avoided table rebuild when adding inline m2m fields on SQLite.
...
Regression in 2f73e5406d
.
Thanks David Wobrock for the report.
2022-11-04 09:30:23 +01:00
Mariusz Felisiak
bc3b8f1524
Refs #34058 -- Fixed changing/deleting sequences when altering pre-Django 4.1 auto fields on PostgreSQL.
...
Thanks Anders Kaseorg for the report.
Follow up to 19e6efa50b
.
Regression in 2eea361eff
.
2022-10-01 07:53:32 +02:00
Mariusz Felisiak
19e6efa50b
Fixed #34058 -- Changed sequence types when altering pre-Django 4.1 auto fields on PostgreSQL.
...
Thanks Anders Kaseorg for the report.
Thanks Florian Apolloner for pair programming.
Regression in 2eea361eff
.
2022-09-29 13:20:14 +02:00
Sergey Fursov
b731e88415
Fixed #31335 -- Fixed removing composed composed Meta constraints/indexes on foreign keys on MySQL.
2022-09-13 10:38:57 +02:00
Sergey Fursov
1b08e9bf7d
Refs #31335 -- Added more tests for removing composed Meta constraints/indexes on foreign keys.
2022-09-12 13:52:06 +02:00
Benoît Vinot
e3cb8bcb7d
Fixed #33932 -- Fixed altering AutoFields to OneToOneField on PostgreSQL.
...
Regression in 2eea361eff
.
2022-08-17 17:06:00 +02:00
Haolun Chai
f3f9d03edf
Fixed #33901 -- Skipped varchar_pattern_ops/text_pattern_ops index creation when db_collation is set.
2022-08-15 06:28:35 +02:00
Mariusz Felisiak
5c803bc070
Fixed #33919 -- Fixed adding AutoFields on PostgreSQL.
...
Thanks Jack Calvin Brown for the report.
Regression in 2eea361eff
.
2022-08-12 17:30:23 +02:00
Fiza Ashraf
c0beff2123
Fixed #33899 -- Fixed migration crash when removing indexed field on SQLite 3.35.5+.
...
Regression in 702819227fd0cdd9b581cd99e11d1561d51cbeb.
Thanks cessor for the report.
2022-08-08 06:28:53 +02:00
Mariusz Felisiak
ab1955a05e
Fixed #33881 -- Added support for database collations to ArrayField(Char/TextFields).
2022-08-02 11:44:26 +02:00
David Wobrock
a6385b382e
Fixed #27236 -- Deprecated Meta.index_together in favor of Meta.indexes.
...
This also deprecates AlterIndexTogether migration operation.
2022-07-12 09:04:31 +02:00
David Wobrock
a3a1290d47
Refs #27236 -- Moved models with Meta.index_together inside of test methods.
2022-06-03 06:32:11 +02:00
David Wobrock
8f04473af1
Fixed #25105 -- Checked deferred constraints before updating rows on PostgreSQL.
2022-05-04 12:15:00 +02:00
Mariusz Felisiak
1b3a949ba2
Refs #33671 -- Fixed migrations crash when adding collation to a primary key on Oracle.
2022-04-29 21:43:55 +02:00
Mariusz Felisiak
b34238addc
Fixed #33670 -- Fixed altering primary key on SQLite.
2022-04-29 20:16:34 +02:00
Florian Apolloner
2eea361eff
Fixed #30511 -- Used identity columns instead of serials on PostgreSQL.
2022-04-13 21:51:51 +02:00
Mariusz Felisiak
a65547c04a
Fixed tests on databases that don't support introspecting foreign keys.
2022-04-13 11:52:40 +02:00
Himanshu-Balasamanta
06ebaa9e28
Fixed #33626 -- Cleared cache when unregistering a lookup.
2022-04-12 06:24:02 +02:00
Mariusz Felisiak
bfe9665502
Skipped SchemaTests.test_alter_field_type_and_db_collation on databases that don't support collation on TextField.
2022-04-06 16:52:13 +02:00
sarahboyce
65effbdb10
Fixed #33471 -- Made AlterField operation a noop when changing "choices".
...
This also allows customizing attributes of fields that don't affect
a column definition.
2022-04-06 13:05:57 +02:00
Carlton Gibson
bb61f0186d
Refs #32365 -- Removed internal uses of utils.timezone.utc alias.
...
Remaining test case ensures that uses of the alias are mapped
canonically by the migration writer.
2022-03-24 06:29:50 +01:00
likecodingloveproblems
4b66a5e617
Fixed #33256 -- Fixed schema test failures when using --keepdb.
2022-03-21 20:54:48 +01:00
Mariusz Felisiak
26c166c3b0
Added test for removing through model from ManyToManyField.
2022-02-25 22:01:27 +01:00