Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Refs #34534 -- Reduced Add/RemoveConstraint and Add/RenameIndex operations ↵ | Akash Kumar Sen | 2023-05-09 | 1 | -0/+12 |
| | | | | when optimizing migrations. | ||||
* | Fixed #34529, Refs #34525 -- Reduced index operations with ↵ | Mariusz Felisiak | 2023-05-03 | 1 | -0/+65 |
| | | | | | | | | Meta.indexes/index_together when optimizing migrations. This makes squashing migrations an available path for changing Meta.index_together, which is deprecated, to Meta.indexes. Follow up to f81032572107846922745b68d5b7191058fdd5f5. | ||||
* | Fixed #34528 -- Reduced Add/RemoveIndex operations when optimizing migrations. | Mariusz Felisiak | 2023-05-01 | 1 | -0/+5 |
| | |||||
* | Fixed #34366 -- Reduced AlterField operations when optimizing migrations. | Laurent Tramoy | 2023-02-24 | 1 | -3/+3 |
| | |||||
* | Fixed #34250 -- Fixed renaming model with m2m relation to a model with the ↵ | DevilsAutumn | 2023-02-14 | 1 | -14/+6 |
| | | | | same name. | ||||
* | Refs #33476 -- Applied Black's 2023 stable style. | David Smith | 2023-02-01 | 1 | -2/+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 #18468 -- Added support for comments on columns and tables. | kimsoungryoul | 2022-12-28 | 2 | -0/+40 |
| | | | | | | | | 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 #33953 -- Reverted "Fixed #33201 -- Made RenameModel operation a noop ↵ | Iuri de Silvio | 2022-08-26 | 1 | -6/+5 |
| | | | | | | | | | for models with db_table." Regression in afeafd6036616bac8263d762c1610f22241c0187. This reverts afeafd6036616bac8263d762c1610f22241c0187. Thanks Timothy Thomas for the report. | ||||
* | Refs #27236 -- Reverted "Refs #27236 -- Added generic mechanism to handle ↵ | Mariusz Felisiak | 2022-07-26 | 1 | -4/+1 |
| | | | | | | the deprecation of migration operations." This reverts commit 41019e48bbf082c985e6ba3bad34d118b903bff1. | ||||
* | Refs #27236 -- Reverted AlterIndexTogether deprecation. | Mariusz Felisiak | 2022-07-26 | 1 | -8/+0 |
| | | | | This partly reverts a6385b382e05a614a99e5a5913d8e631823159a2. | ||||
* | Fixed #27236 -- Deprecated Meta.index_together in favor of Meta.indexes. | David Wobrock | 2022-07-12 | 1 | -0/+8 |
| | | | | This also deprecates AlterIndexTogether migration operation. | ||||
* | Refs #27236 -- Added generic mechanism to handle the deprecation of ↵ | David Wobrock | 2022-07-08 | 1 | -1/+4 |
| | | | | migration operations. | ||||
* | Fixed #33710 -- Made RenameIndex operation a noop when the old and new name ↵ | David Wobrock | 2022-05-16 | 1 | -0/+3 |
| | | | | match. | ||||
* | Refs #27064 -- Added RenameIndex migration operation. | David Wobrock | 2022-05-12 | 2 | -0/+148 |
| | |||||
* | Fixed #33572 -- Implemented CreateModel/AlterModelManagers reduction. | Adam Johnson | 2022-03-11 | 1 | -0/+13 |
| | |||||
* | Refs #33476 -- Reformatted code with Black. | django-bot | 2022-02-07 | 5 | -300/+396 |
| | |||||
* | Fixed #33402 -- Optimized multiple AlterFooTogether operations. | David Wobrock | 2022-01-04 | 1 | -1/+12 |
| | |||||
* | Fixed #33201 -- Made RenameModel operation a noop for models with db_table. | Iuri de Silvio | 2021-10-27 | 1 | -5/+6 |
| | |||||
* | Fixed #33197 -- Made field rename with prior matching db_column change a noop. | Simon Charette | 2021-10-19 | 1 | -1/+5 |
| | | | | Thanks Jacob Walls for the report. | ||||
* | Refs #29898 -- Moved state_forwards()'s logic from migration operations to ↵ | manav014 | 2021-06-29 | 2 | -138/+40 |
| | | | | | | ProjectState. Thanks Simon Charette and Markus Holtermann for reviews. | ||||
* | Refs #29898 -- Moved django.db.migrations.operations.utils to ↵ | manav014 | 2021-06-22 | 3 | -77/+6 |
| | | | | django.db.migrations.utils. | ||||
* | Refs #29899 -- Moved resolve_relation() to django.db.migrations.utils. | David Wobrock | 2021-04-16 | 2 | -30/+3 |
| | |||||
* | Fixed #32256 -- Fixed migration optimization crash when swapping field names. | Hasan Ramezani | 2021-02-19 | 1 | -2/+5 |
| | | | | | | | This disables optimization of RenameField operation when an old field name is referenced in subsequent operations. Co-authored-by: InvalidInterrupt <InvalidInterrupt@users.noreply.github.com> | ||||
* | Fixed #26167 -- Added support for functional indexes. | Hannes Ljungberg | 2021-01-13 | 1 | -0/+6 |
| | | | | | | Thanks Simon Charette, Mads Jensen, and Mariusz Felisiak for reviews. Co-authored-by: Markus Holtermann <info@markusholtermann.eu> | ||||
* | Fixed #32262 -- Fixed migration optimization for model creation and Meta ↵ | Hasan Ramezani | 2020-12-18 | 1 | -1/+5 |
| | | | | options removal. | ||||
* | Fixed #31954 -- Fixed migration optimization for MTI model creation with ↵ | Koen De Wit | 2020-08-28 | 1 | -1/+2 |
| | | | | parent model with mixed case app label. | ||||
* | Fixed #31468 -- Allowed specifying migration filename in Operation. | Adam Johnson | 2020-05-28 | 3 | -0/+76 |
| | | | | This adds also suggested filename for many built-in operations. | ||||
* | Fixed #31499 -- Stored ModelState.fields into a dict. | Simon Charette | 2020-04-22 | 3 | -28/+18 |
| | | | | | | | | | | | | | | This allows the removal of its O(n) .get_field_by_name method and many other awkward access patterns. While fields were initially stored in a list to preserve the initial model definiton field ordering the auto-detector doesn't take field ordering into account and no operations exists to reorder fields of a model. This makes the preservation of the field ordering completely superflous because field reorganization after the creation of the model state wouldn't be taken into account. | ||||
* | Refs #28305 -- Consolidated field referencing detection in migrations. | Simon Charette | 2020-04-10 | 3 | -95/+118 |
| | | | | | | This moves all the field referencing resolution methods to shared functions instead of duplicating efforts amongst state_forwards and references methods. | ||||
* | Replaced ModelTuple by a model resolving function and bare tuples. | Simon Charette | 2020-04-09 | 3 | -43/+42 |
| | | | | | ModelTuple made handling of app_label=None easier but it isn't necessary anymore. | ||||
* | Replaced Operation._get_model_tuple() by ModelTuple.from_model(). | Simon Charette | 2020-04-09 | 2 | -10/+1 |
| | | | | This method predated the introduction of ModelTuple and had a single use. | ||||
* | Made Operation.references_model/references_field require app_label. | Simon Charette | 2020-04-09 | 3 | -14/+14 |
| | | | | | This will allow them to drop a ton of logic to deal with null app_label. | ||||
* | Refs #22608 -- Made app_label required when optimizing migrations. | Simon Charette | 2020-04-09 | 3 | -19/+19 |
| | | | | | This paved the way for the removal of lot of logic when app_label was not specified. | ||||
* | Refs #29000 -- Restored delayed model rendering of RenameField. | Simon Charette | 2020-04-07 | 1 | -7/+6 |
| | | | | | | | Non-delayed rendering is unnecessary and wasteful now that state models relationship consistency on delayed reload is ensured. This partly reverts commit fcc4e251dbc917118f73d7187ee2f4cbf3883f36. | ||||
* | Simplified imports from django.db and django.contrib.gis.db. | Nick Pope | 2020-02-04 | 1 | -1/+1 |
| | |||||
* | Simplified AlterModelTable by making it subclass ModelOptionOperation. | Nick Pope | 2019-08-02 | 1 | -13/+8 |
| | |||||
* | Fixed typos in docs, comments, and exception messages. | Ville Skyttä | 2019-04-18 | 1 | -1/+1 |
| | |||||
* | Fixed #29868 -- Retained database constraints on SQLite table rebuilds. | Simon Charette | 2018-10-29 | 1 | -1/+3 |
| | | | | | Refs #11964. Thanks Scott Stevens for testing this upcoming feature and the report. | ||||
* | Refs #28909 -- Simplifed code using unpacking generalizations. | Sergey Fedoseev | 2018-09-28 | 1 | -6/+2 |
| | |||||
* | Fixed #29755 -- Made migrations detect changes to Meta.default_related_name. | Simon Charette | 2018-09-14 | 1 | -0/+1 |
| | |||||
* | Fixed typos in comments and docs. | luz.paz | 2018-08-01 | 1 | -1/+1 |
| | |||||
* | Refs #28862 -- Removed the FieldRelatedOptionOperation.reduce() optimization. | Simon Charette | 2018-07-19 | 1 | -15/+14 |
| | | | | | It isn't required anymore since AlterTogetherOperations can be reduced into CreateModels which can reduce DeleteField operations. | ||||
* | Fixed #26906 -- Reduced alter together operations code duplication. | Simon Charette | 2018-07-19 | 1 | -60/+30 |
| | | | | Thanks Akshesh Doshi for the initial patch. | ||||
* | Fixed #27731 -- Implemented CreateModel/AlterFooOperation reduction. | Simon Charette | 2018-07-19 | 1 | -2/+38 |
| | | | | | | | | This should alleviate the side effects of disabling the AlterFooOperation reduction with RemoveField to fix refs #28862 during migration squashing because CreateModel can perform a reduction with RemoveField. Thanks Nick Pope for the review. | ||||
* | Fixed #28862 -- Disabled optimization of AlterFooTogether and RemoveField. | Simon Charette | 2018-07-19 | 1 | -4/+5 |
| | | | | | | | | | | | | | AlterFooTogether operations cannot be swapped with RemoveField operations on the same model as they could be removing the the same field as well. Since AlterFooTogether operations don't track what their previous value was, it's impossible to determine whether or not the optimization is safe so the only way to proceed is to disable the optimization. Thanks Ramiro Morales for the in-depth analysis of the issue. Refs #24828 | ||||
* | Removed in_between from Operation.reduce()'s signature. | Simon Charette | 2018-07-11 | 3 | -23/+23 |
| | | | | | It isn't used since FieldOperation.references_model() takes into account models referenced by the field it's operating on. | ||||
* | Allowed RemoveField operations to be optimized through. | Simon Charette | 2018-07-11 | 1 | -7/+2 |
| | |||||
* | Relaxed FieldOperation.references_field remote field checking. | Simon Charette | 2018-07-11 | 1 | -0/+27 |
| | |||||
* | Introduced ModelTuple to remove migrations boilerplate. | Simon Charette | 2018-07-11 | 4 | -60/+62 |
| | |||||
* | Fixed #26720 -- Prevented invalid CreateModel optimizations of related fields. | Simon Charette | 2018-07-11 | 2 | -18/+48 |
| |