Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fixed #470 -- Added support for database defaults on fields. | Ian Foote | 2023-05-12 | 1 | -4/+20 |
| | | | | | | | | Special thanks to Hannes Ljungberg for finding multiple implementation gaps. Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for reviews. | ||||
* | Moved SQLite DatabaseSchemaEditor.add_field()'s comment to the correct line. | Mariusz Felisiak | 2023-05-09 | 1 | -2/+1 |
| | |||||
* | Refs #27236 -- Made more cosmetic edits to Meta.index_together deprecation. | Mariusz Felisiak | 2023-05-05 | 1 | -2/+3 |
| | |||||
* | Refs #33476 -- Applied Black's 2023 stable style. | David Smith | 2023-02-01 | 1 | -1/+1 |
| | | | | | | | | 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 #28987 -- Fixed altering ManyToManyField when changing to ↵ | DevilsAutumn | 2022-11-17 | 1 | -18/+31 |
| | | | | self-referential. | ||||
* | Fixed #34138 -- Avoided table rebuild when adding inline m2m fields on SQLite. | Mariusz Felisiak | 2022-11-04 | 1 | -1/+4 |
| | | | | | Regression in 2f73e5406d54cb8945e187eff302a3a3373350be. Thanks David Wobrock for the report. | ||||
* | Fixed #33899 -- Fixed migration crash when removing indexed field on SQLite ↵ | Fiza Ashraf | 2022-08-08 | 1 | -2/+3 |
| | | | | | | | | 3.35.5+. Regression in 702819227fd0cdd9b581cd99e11d1561d51cbeb. Thanks cessor for the report. | ||||
* | Fixed #33413 -- Made migrations propage collations to related fields. | David Wobrock | 2022-05-02 | 1 | -1/+5 |
| | |||||
* | Fixed #33670 -- Fixed altering primary key on SQLite. | Mariusz Felisiak | 2022-04-29 | 1 | -1/+6 |
| | |||||
* | Refs #32502 -- Avoided table rebuild when removing fields on SQLite 3.35.5+. | Mariusz Felisiak | 2022-02-11 | 1 | -0/+10 |
| | | | | ALTER TABLE ... DROP COLUMN was introduced in SQLite 3.35+ however a data corruption issue was fixed in SQLite 3.35.5. | ||||
* | Refs #33476 -- Refactored code to strictly match 88 characters line length. | Mariusz Felisiak | 2022-02-07 | 1 | -3/+6 |
| | |||||
* | Refs #33476 -- Reformatted code with Black. | django-bot | 2022-02-07 | 1 | -111/+196 |
| | |||||
* | Fixed #33408 -- Fixed adding nullable unique fields on SQLite. | Mariusz Felisiak | 2022-01-04 | 1 | -4/+9 |
| | | | | | Regression in 2f73e5406d54cb8945e187eff302a3a3373350be. Thanks Alan Crosswell for the report. | ||||
* | Refs #32502 -- Avoided table rebuild when adding fields with no default on ↵ | Mariusz Felisiak | 2021-12-10 | 1 | -8/+9 |
| | | | | SQLite. | ||||
* | Refs #32502 -- Added SchemaEditor.prepare_default() on SQLite. | Mariusz Felisiak | 2021-12-10 | 1 | -3/+6 |
| | |||||
* | Refs #33288 -- Removed SQLite's ↵ | Simon Charette | 2021-11-15 | 1 | -3/+2 |
| | | | | | | | DatabaseIntrospection._get_foreign_key_constraints(). The get_relations() method returns the exact same data in a more generic format. | ||||
* | Fixed #32962 -- Consolidated string concatenations in ↵ | Chris Jerdonek | 2021-07-27 | 1 | -1/+1 |
| | | | | BaseDatabaseSchemaEditor.column_sql(). | ||||
* | Fixed #32780 -- Made Add/RemoveConstraint operations a noop for ↵ | Hannes Ljungberg | 2021-05-25 | 1 | -2/+8 |
| | | | | covering/deferrable unique constraints on SQLite. | ||||
* | Fixed #30916 -- Added support for functional unique constraints. | Hannes Ljungberg | 2021-02-23 | 1 | -2/+6 |
| | | | | Thanks Ian Foote and Mariusz Felisiak for reviews. | ||||
* | Fixed #31777 -- Added support for database collations to Char/TextFields. | Tom Carrick | 2020-09-21 | 1 | -0/+3 |
| | | | | Thanks Simon Charette and Mariusz Felisiak for reviews. | ||||
* | Fixed #31825 -- Made RenameField operation a noop for fields with db_column. | Iuri de Silvio | 2020-08-13 | 1 | -0/+2 |
| | |||||
* | Refs #30591 -- Adjusted table rebuild for non-pk relationship on SQLite. | Simon Charette | 2020-04-21 | 1 | -10/+12 |
| | | | | | The existing code was only accounting for primary key changes and not all unique key fields that can be referenced. | ||||
* | Fixed #31064 -- Recreated auto-created many-to-many tables on primary key ↵ | Simon Charette | 2020-04-21 | 1 | -1/+10 |
| | | | | | | | data type change on SQLite. Both local and remote auto-created many-to-many relationships were affected. | ||||
* | Stopped rebuilding referenced tables multiple times on SQLite alterations. | Simon Charette | 2020-04-20 | 1 | -3/+9 |
| | |||||
* | Simplified imports from django.db and django.contrib.gis.db. | Nick Pope | 2020-02-04 | 1 | -1/+1 |
| | |||||
* | Fixed #30664 -- Fixed migrations crash when altering table on SQLite or ↵ | Ngalim Siregar | 2019-08-01 | 1 | -1/+2 |
| | | | | altering AutoField/BigAutoField on PostgreSQL for models with quoted db_table. | ||||
* | Fixed #30062 -- Added support for unique conditional constraints. | Paveł Tyślacki | 2019-01-12 | 1 | -2/+9 |
| | |||||
* | Fixed #30060 -- Moved SQL generation for indexes and constraints to ↵ | Paveł Tyślacki | 2019-01-01 | 1 | -1/+1 |
| | | | | SchemaEditor. | ||||
* | Refs #30033 -- Checked constraints before committing SQLite schema changes. | Simon Charette | 2018-12-22 | 1 | -1/+1 |
| | | | | | | This order of operations is more in line with SQLite's documented table rebuild procedure and ensures that changes aren't committed if foreign key integrity is broken. | ||||
* | Renamed SQLite3 references to to SQLite. | Simon Charette | 2018-12-22 | 1 | -1/+1 |
| | | | | The version suffix isn't part of the product name. | ||||
* | Refs #29182 -- Stopped relying on legacy alter table semantic on SQLite 3.26+. | Simon Charette | 2018-12-17 | 1 | -5/+5 |
| | | | | | | | | SQLite 3.26 changed the behavior of table and column renaming operations to repoint foreign key references even if foreign key checks are disabled. This makes the workarounds in place to simulate this behavior unnecessary on SQLite 3.26+. Refs #30033. | ||||
* | Fixed #30033 -- Conformed to the recommended table alterations procedure on ↵ | Simon Charette | 2018-12-17 | 1 | -46/+60 |
| | | | | | | | | | | | | SQlite3. Refs #29182. The previous implementation was following a procedure explicitly documented as incorrect and was the origin of the breakage experienced on SQLite 3.26 release that were addressed by c8ffdbe514b55ff5c9a2b8cb8bbdf2d3978c188f. Thanks to Richard Hipp for pointing out the usage of the incorrect procedure. | ||||
* | Fixed #30023 -- Prevented SQLite schema alterations while foreign key checks ↵ | Simon Charette | 2018-12-15 | 1 | -2/+9 |
| | | | | | | | | | | | | | are enabled. Prior to this change foreign key constraint references could be left pointing at tables dropped during operations simulating unsupported table alterations because of an unexpected failure to disable foreign key constraint checks. SQLite3 does not allow disabling such checks while in a transaction so they must be disabled beforehand. Thanks ezaquarii for the report and Carlton and Tim for the review. | ||||
* | Fixed #29182 -- Fixed schema table alteration on SQLite 3.26+. | Simon Charette | 2018-12-07 | 1 | -0/+2 |
| | | | | | | | | | | | | SQLite 3.26 repoints foreign key constraints on table renames even when foreign_keys pragma is off which breaks every operation that requires a table rebuild to simulate unsupported ALTER TABLE statements. The newly introduced legacy_alter_table pragma disables this behavior and restores the previous schema editor assumptions. Thanks Florian Apolloner, Christoph Trassl, Chris Lamb for the report and troubleshooting assistance. | ||||
* | Refs #29641 -- Refactored database schema constraint creation. | Simon Charette | 2018-11-13 | 1 | -1/+1 |
| | | | | | | | | | Added a test for constraint names in the database. Updated SQLite introspection to use sqlparse to allow reading the constraint name for table check and unique constraints. Co-authored-by: Ian Foote <python@ian.feete.org> | ||||
* | Fixed #29868 -- Retained database constraints on SQLite table rebuilds. | Simon Charette | 2018-10-29 | 1 | -11/+3 |
| | | | | | Refs #11964. Thanks Scott Stevens for testing this upcoming feature and the report. | ||||
* | Fixed #29763 -- Added support for column renaming on SQLite. | Hampus Dunström | 2018-10-27 | 1 | -0/+8 |
| | |||||
* | Fixed #11964 -- Added support for database check constraints. | Ian Foote | 2018-07-10 | 1 | -1/+18 |
| | |||||
* | Fixed #28884 -- Fixed crash on SQLite when renaming a field in a model ↵ | Simon Charette | 2017-12-22 | 1 | -4/+23 |
| | | | | | | | | | | | | | | | | | referenced by a ManyToManyField. Introspected database constraints instead of relying on _meta.related_objects to determine whether or not a table or a column is referenced on rename operations. This has the side effect of ignoring both db_constraint=False and virtual fields such as GenericRelation which aren't backend by database level constraints and thus shouldn't prevent the rename operations from being performed in a transaction. Regression in 095c1aaa898bed40568009db836aa8434f1b983d. Thanks Tim for the additional tests and edits, and Mariusz for the review. | ||||
* | Fixed #28849 -- Fixed referenced table and column rename on SQLite. | Simon Charette | 2017-12-01 | 1 | -2/+58 |
| | | | | Thanks Ramiro for the input and Tim for the review. | ||||
* | Fixed #28854 -- Replaced type(True) with bool in sqlite's SchemaEditor. | Дилян Палаузов | 2017-11-28 | 1 | -1/+1 |
| | |||||
* | Used bytes.hex() and bytes.fromhex() to simplify. | Sergey Fedoseev | 2017-11-23 | 1 | -8/+2 |
| | |||||
* | Fixed #14204 -- Enforced SQLite foreign key constraints. | Claude Paroz | 2017-07-11 | 1 | -12/+11 |
| | | | | | Thanks Tim Graham for contributing to the patch and Simon Charette for advice and review. | ||||
* | Refs #25530 -- Deleted deferred SQL references on delete operation. | Simon Charette | 2017-06-21 | 1 | -5/+4 |
| | |||||
* | Refs #25530 -- Tracked references of deferred SQL statements. | Simon Charette | 2017-06-21 | 1 | -3/+7 |
| | |||||
* | Refs #23968 -- Removed unnecessary lists, generators, and tuple calls. | Jon Dufresne | 2017-06-01 | 1 | -1/+1 |
| | |||||
* | Refs #27656 -- Updated django.db docstring verbs according to PEP 257. | Anton Samarchyan | 2017-02-28 | 1 | -9/+6 |
| | |||||
* | Refs #23919 -- Replaced super(ClassName, self) with super(). | chillaranand | 2017-01-25 | 1 | -3/+3 |
| | |||||
* | Refs #23919 -- Removed six.<various>_types usage | Claude Paroz | 2017-01-18 | 1 | -7/+4 |
| | | | | Thanks Tim Graham and Simon Charette for the reviews. | ||||
* | Fixed #26808 -- Added Meta.indexes for class-based indexes. | Akshesh | 2016-08-05 | 1 | -0/+8 |
| | | | | | | | | * Added the index name to its deconstruction. * Added indexes to sqlite3.schema._remake_table() so that indexes aren't dropped when _remake_table() is called. Thanks timgraham & MarkusH for review and advice. |