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
Mariusz Felisiak
3702819227
Refs #32502 -- Avoided table rebuild when removing fields on SQLite 3.35.5+.
...
ALTER TABLE ... DROP COLUMN was introduced in SQLite 3.35+ however
a data corruption issue was fixed in SQLite 3.35.5.
2022-02-11 22:21:58 +01:00
Mariusz Felisiak
7119f40c98
Refs #33476 -- Refactored code to strictly match 88 characters line length.
2022-02-07 20:37:05 +01:00
django-bot
9c19aff7c7
Refs #33476 -- Reformatted code with Black.
2022-02-07 20:37:05 +01:00
Mariusz Felisiak
30613d6a74
Fixed #33408 -- Fixed adding nullable unique fields on SQLite.
...
Regression in 2f73e5406d
.
Thanks Alan Crosswell for the report.
2022-01-04 05:50:00 +01:00
mdalp
3b73f77ad4
Fixed #33358 -- Fixed handling timedelta < 1 day in schema operations on Oracle.
2021-12-14 09:08:25 +01:00
Mariusz Felisiak
2f73e5406d
Refs #32502 -- Avoided table rebuild when adding fields with no default on SQLite.
2021-12-10 17:13:05 +01:00
Tim Graham
ddf321479b
Removed unneeded @skipUnlessDBFeature('supports_combined_alters').
...
The test acts a regression test for 715ccfde24
if the feature is True, but it works on other backends too.
2021-11-24 09:13:28 +01:00
Simon Charette
30ec7fe89a
Refs #33288 -- Made SQLite introspection raise DatabaseError on nonexistent 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-15 07:57:00 +01:00
Jordan Bae
f5a3243911
Fixed #33125 -- Avoided redundant unique constraint when converting a non-unique field to primary key on MySQL and PostgreSQL.
2021-09-28 06:20:37 +02:00
Mariusz Felisiak
338fc0e7f1
Fixed #33080 -- Preserved nullability of textual fields on Oracle.
...
Thanks Matt Hoskins for the report.
2021-09-01 20:54:12 +02:00
Mariusz Felisiak
f65eb46646
Fixed typo in tests/schema/tests.py docstrings.
2021-09-01 20:54:12 +02:00
David Smith
1cba320786
Refs #32956 -- Changed "afterwards" to "afterward" in docs and comments.
...
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-27 10:41:51 +02:00
Daniyal
f479df7f8d
Refs #32508 -- Raised Type/ValueError instead of using "assert" in django.db.models.
...
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-15 11:43:33 +02:00
Mariusz Felisiak
fa0433d05f
Fixed #32832 -- Fixed adding BLOB/TEXT nullable field with default on MySQL 8.0.13+.
...
Regression in d4ac23bee1
.
Thanks Omkar Deshpande for the report.
2021-06-10 20:03:43 +02:00