Tim Graham
471fb04a30
Fixed flake8 errors.
2014-04-20 13:08:04 -04:00
Andrew Gorcester
956bd64424
Fixed #22397 -- Issues removing M2M field with explicit through model
...
Changed the migration autodetector to remove models last so that FK
and M2M fields will not be left as dangling references. Added a check
in the migration state renderer to error out in the presence of
dangling references instead of leaving them as strings. Fixed a bug
in the sqlite backend to handle the deletion of M2M fields with
"through" models properly (i.e., do nothing successfully).
Thanks to melinath for report, loic for tests and andrewgodwin and
charettes for assistance with architecture.
2014-04-18 16:44:47 -04:00
Simon Charette
0d397e5a5b
Revert "Fixed #22397 -- Issues removing M2M field with explicit through model."
...
This reverts commit 00e3b9a2a9
.
It's causing a regression when tested with the proxy_model_inheritance tests.
2014-04-18 01:27:30 -04:00
Andrew Gorcester
00e3b9a2a9
Fixed #22397 -- Issues removing M2M field with explicit through model.
...
Changed the migration autodetector to remove models last so that FK
and M2M fields will not be left as dangling references. Added a check
in the migration state renderer to error out in the presence of
dangling references instead of leaving them as strings. Fixed a bug
in the sqlite backend to handle the deletion of M2M fields with
"through" models properly (i.e., do nothing successfully).
Thanks to melinath for report, loic for tests and andrewgodwin and
charettes for assistance with architecture.
2014-04-17 12:54:35 -04:00
Loic Bistuer
0fd51cf0bd
Fixed #22319 -- Fixed migration external dependencies when there are internal dependencies.
2014-03-31 06:50:38 -04:00
Tim Graham
42336c84a0
Fixed #22331 -- Made MigrationAutodetector ignore unmanaged models.
...
This commit reverts 69d4b1c
and tackle the issue from a different angle.
Models remain present in the project state, but are now ignored by the
autodetector.
2014-03-25 18:30:58 -04:00
Stephen Burrows
35ed792cf2
Fixed #22300 -- Fixed crash in migrations when changing non-relational field to relational.
2014-03-25 07:46:15 -04:00
Andrew Godwin
81f5408c7a
Fixed #22275 : unique_together broken if ForeignKey split into new file.
...
Thanks to bak1an for the patch.
2014-03-19 21:23:21 -07:00
Chris Beaven
40f6ca54f8
Fix autodetector creation of RenameModel migration to capitalize model names
2014-03-11 12:23:45 +13:00
Chris Beaven
7feb70eef3
Fixed #22239 -- Add auto detection of renamed models
2014-03-10 13:55:44 +13:00
Andrew Godwin
e46e15e5a1
Fixed #22204 : Bad circular-dep-breaking if more than one per run
2014-03-06 13:22:42 -08:00
Andrew Godwin
3c547a423f
Merge pull request #2270 from bmispelon/ticket-22030
...
Fixed #22030 -- Don't assume that all fields have a swappable_setting at...
2014-02-17 01:16:49 +00:00
Anton Baklanov
0bd92d68ad
Fixed #22035 -- reordered migration operations
...
Now AddField actions appear in operations list before AlterUniqueTogether
actions.
Thanks to SmileyChris for the report.
2014-02-14 20:00:39 -05:00
Baptiste Mispelon
6873eeeefb
Fixed #22030 -- Don't assume that all fields have a swappable_setting attribute.
2014-02-13 17:43:21 +01:00
Andrew Godwin
bad9456b9c
Fix my slightly hasty autodetector changes
2014-02-12 17:22:50 +00:00
Andrew Godwin
c9de1b4a55
Implement swappable model support for migrations
2014-01-19 16:43:12 +00:00
Andrew Godwin
3b8e46cbc7
Migration VCS conflict detection and --merge for makemigrations
2013-12-04 16:01:49 +00:00
Markus Holtermann
5a424c2393
Fixed #21114 -- Migrations must not have a dependency to themselves.
2013-09-17 11:47:19 -04:00
Andrew Godwin
05e14e8eaf
Migration autodetector now corerctly deals with proxy models
2013-09-06 12:39:46 -05:00
Andrew Godwin
2e7f45a372
Change autodetector changes API to be just one method
2013-08-21 22:25:15 +01:00
Andrew Godwin
a758c9c186
Add test for creating M2Ms
2013-07-25 16:36:58 +01:00
Andrew Godwin
3b20af3e96
Autodetection of unique_together changes
2013-07-02 11:25:18 +01:00
Andrew Godwin
67dcea711e
Add unique_together altering operation
2013-07-02 11:19:02 +01:00
Andrew Godwin
e2d7e83256
Autodetect ForeignKeys and add dependencies/split on circulars
2013-06-22 17:15:51 +01:00
Andrew Godwin
cca40703df
Prompt about renames rather than doing them automatically
2013-06-21 15:32:15 +01:00
Andrew Godwin
92a10f5552
Autodetect field renames. HAHAHA. AHAHAHAHA. YES.
2013-06-20 16:02:43 +01:00
Andrew Godwin
47e4b86ddf
Autodetect field alters
2013-06-20 15:19:30 +01:00
Andrew Godwin
6f667999e1
Add operation that renames tables
2013-06-20 14:54:11 +01:00
Andrew Godwin
ab5cbae9b7
First stab at some migration creation commands
2013-06-19 15:36:22 +01:00
Andrew Godwin
91c470def5
Auto-naming for migrations and some writer fixes
2013-06-07 17:56:43 +01:00
Andrew Godwin
cd809619a2
Autodetector tests
2013-06-07 15:49:48 +01:00