Markus Holtermann
d49b5851b4
[1.7.x] Added test for an intermediate swappable model change in migration state.
...
refs #22563
Backport of fca866763acb6b3414c20ca3772b94cb5d111733 from master
2014-12-30 10:03:41 -05:00
Tim Graham
79645529e7
Revert "[1.7.x] Fixed #23938 -- Added migration support for m2m to concrete fields and vice versa"
...
This reverts commit 1702bc52cc20ed0729893177fc8f4391b4b3183c.
This doesn't work on stable/1.7.x because #23844 wasn't backported and we're
not willing to do so because it's a large change.
2014-12-29 15:37:15 -05:00
Markus Holtermann
1702bc52cc
[1.7.x] Fixed #23938 -- Added migration support for m2m to concrete fields and vice versa
...
Thanks to Michael D. Hoyle for the report and Tim Graham for the review.
Backport of 623ccdd598625591d1a12fc1564cf3ef9a87581f from master
2014-12-29 13:42:29 -05:00
Tim Graham
51ea30a43b
[1.7.x] Fixed #24037 -- Prevented data loss possibility when changing Meta.managed.
...
The migrations autodetector now issues AlterModelOptions operations for
Meta.managed changes instead of DeleteModel + CreateModel.
Thanks iambibhas for the report and Simon and Markus for review.
Backport of 061caa5b386681dc7bdef16918873043224a299c from master
2014-12-23 14:26:56 -05:00
Andriy Sokolovskiy
fdf4dc6cea
[1.7.x] Fixed #23405 -- Fixed makemigrations prompt when adding Text/CharField.
...
A default is no longer required.
Backport of d8f3b86a7691c8aa0ec8f5a064ad4c3218250fed from master
2014-12-15 14:58:01 -05:00
Markus Holtermann
f446acf8bb
[1.7.x] Fixed #23956 -- Fixed migration creation for multiple table inheritance
...
Backport of 44927ba817a4ecf9834d429ff6c86bc5ac961305 from master
2014-12-11 13:28:57 -05:00
Andrzej Pragacz
feded19104
[1.7.x] Fixed #23794 -- Fixed migrations crash when removing a field that's part of index/unique_together.
...
Backport of 72729f844e0dd9bd01b3874171b89ab0d136a40e from master
2014-11-21 10:57:38 -05:00
Markus Holtermann
1b8c067a4f
[1.7.x] Cleaned up and reformatted autodetector tests
...
Backport of 233165083593baf5f62194f50df26fb830e5f570 from master.
2014-11-19 18:25:00 -05:00
Markus Holtermann
2f8cd09a06
[1.7.x] Formatted model states in autodetector tests
...
Backport of f17acd59303a27876966927869af7f4bfe38a74a from master.
2014-11-19 18:25:00 -05:00
Markus Holtermann
21358e7225
[1.7.x] Fixed #23614 -- Changed the way the migration autodetector orders unique/index_together
...
Thanks to Naddiseo for the report and Tim Graham for the review
Backport of 5c9c1e029d from master
2014-10-29 13:16:23 -04:00
Tianyi Wang
3f3bed8fb9
[1.7.x] Fixed #23629 -- Allowed autodetector to detect changes in Meta.db_table.
...
Thanks Naddiseo for reporting.
Backport of 5732424bee from master
2014-10-20 13:15:34 -04:00
Markus Holtermann
71988ed953
[1.7.x] Fixed #23609 -- Fixed IntegrityError that prevented altering a NULL column into a NOT NULL one due to existing rows
...
Thanks to Simon Charette, Loic Bistuer and Tim Graham for the review.
Backport of f633ba778d from master
2014-10-09 22:41:27 +07:00
Markus Holtermann
00c2a721e2
[1.7.x] Fixed #23415 -- Added fields for unmanaged and proxy model migrations.
...
Thanks sky-chen for the report.
Backport of 215aa4f53b from master
2014-09-25 10:28:11 -04:00
Markus Holtermann
67872bfff1
[1.7.x] Fixed #23452 -- Prevented infinite migrations for empty unique/index_together.
...
Thanks fwkroon for the report.
Backport of 6d5958c7a3 from master
2014-09-10 07:57:31 -04:00
Andrew Pinkham
27e7972e63
[1.7.x] Fixed #22951 -- Checked for types during deep_deconstruct migration serializ
...
Thanks Sam Hartsfield for the report.
Backport of 4680d25df2 from master
2014-09-08 07:58:06 -04:00
Raffaele Salmaso
1a918806ca
[1.7.x] Fixed #23341 -- Added migration name to nonexistent migration error in makemigrations.
...
Backport of abd640fbdf from master
2014-08-23 19:19:58 -04:00
Markus Holtermann
2da20379c0
[1.7.x] Fixed #23322 -- Use resolved swappable model for dependency resolution during makemigrations
...
Backport of 144cff3f51 from master
2014-08-20 16:08:49 -04:00
Tim Graham
6981eced83
[1.7.x] Fixed migrations tests added in refs #23315 .
...
Backport of d1299fce0e from master
2014-08-20 14:01:50 -04:00
Andrew Godwin
824e02bf83
[1.7.x] Fixed #23315 : Operational dependency fail with mixed create/add
2014-08-19 19:51:23 -07:00
Andrew Godwin
72fdd62e93
[1.7.x] Fixed #23275 : Unmanaged models kept by autodetector, ignored by ops
2014-08-12 12:51:11 -07:00
Andrew Godwin
0a4fbf4e13
[1.7.x] Fixed #23101 : Prefer doing deletes before creates in autodetector.
...
Makes declined or missed renames still work (but drop data).
2014-07-29 09:39:01 -07:00
Andrew Godwin
394053ce60
[1.7.x] Fixed #23121 : AlterModelOptions operation not changing state right
2014-07-28 10:47:55 -07:00
Andrew Godwin
d84b881600
[1.7.x] Fixed #23100 : Individual FK creation missing dependencies
2014-07-28 10:33:28 -07:00
Andrew Godwin
7e708a2536
[1.7.x] Fixed #22944 : Bad dependency on FK alteration in autodetector
2014-07-26 09:22:31 -07:00
Jeroen Dekkers
6e7e5bacd5
[1.7.x] Fixed #23071 -- Use last migration's name in dependency to other app
...
Changed the autodetector to lookup the name of the other app's last
migration in the graph and use that as dependency instead of using
__latest__.
2014-07-25 08:54:54 -07:00
Tim Graham
b918bc921c
[1.7.x] Fixed #23014 -- Infinite migration regression with unique/index_together.
...
Backport of 64e75c47ef from master
2014-07-24 14:30:16 -04:00
Andrew Godwin
de709001c4
[1.7.x] Fixed #23041 : Bad base dependencies for proxy models
2014-07-16 09:59:37 -07:00
Tim Graham
fe5f29eb1d
[1.7.x] Fixed #23008 -- Fixed typo causing bad migration dependencies.
...
Thanks semenov for the report and Florian for investigation.
Backport of 9a2ab62977 from master
2014-07-15 08:51:16 -04:00
Andrew Godwin
eb7e232e7f
[1.7.x] Fix comment
2014-07-10 10:01:12 -07:00
Andrew Godwin
aba75e73db
[1.7.x] Fixed #22970 : Incorrect dependencies for existing migrated apps
2014-07-09 23:53:53 -07:00
Andrew Godwin
1f889800d6
[1.7.x] Fixed #22960 : Bad handling of relations as PKs in autodetector
2014-07-05 16:33:34 -07:00
Tim Graham
f1428dc796
[1.7.x] Fixed #22903 -- Fixed migration generation if index_together or unique_together is removed from a model.
...
Backport of e0cd07ec2f from master
2014-06-25 10:04:46 -04:00
Andrew Godwin
48a2e027bf
[1.7.x] Fixed #22708 : Typo in autodetector base dependency gen
2014-06-23 20:48:59 -07:00
Andrew Godwin
d9a7663b11
[1.7.x] Fixed #22783 : Make sure swappable models come first in creation
2014-06-16 10:20:52 -07:00
Andrew Godwin
a81282a512
[1.7.x] Fixed #22568 : Better proxy model support in migrations
2014-06-15 16:02:24 -07:00
Andrew Godwin
e5cde2062c
[1.7.x] Fixed #22470 : Full migration support for order_with_respect_to
2014-06-15 14:57:00 -07:00
Andrew Godwin
3ef87f664b
[1.7.x] Persist non-schema-relevant Meta changes in migrations
2014-06-15 12:34:34 -07:00
Andrew Godwin
13aa079941
[1.7.x] Fixed #22833 : Autodetector not doing through mapping correctly
2014-06-15 12:07:27 -07:00
Andrew Godwin
55fa4c2d34
[1.7.x] Fixed #22777 : Add dependency on through for autodetected M2M adds
2014-06-08 17:13:11 -07:00
Andrew Godwin
b568bdf8da
[1.7.x] Fixed #22750 , #22248 : Model renaming now also alters field FKs
2014-06-07 18:18:18 -07:00
Andrew Godwin
31fc34e447
[1.7.x] Rewrote migration autodetector to involve actual computer science.
...
Fixes #22605 , #22735 ; also lays the ground for some other fixes.
Conflicts:
django/db/migrations/autodetector.py
2014-06-05 23:27:21 -07:00
Simon Charette
33511662dd
[1.7.x] Fixed #22659 -- Prevent model states from sharing field instances.
...
Thanks to Trac alias tbartelmess for the report and the test project.
Backport of 7a38f88922 from master
2014-06-01 15:12:23 -04:00
Claude Paroz
e8a7436941
[1.7.x] Harmonized some PEP 0263 coding preambles
...
Backport of e520a73ee from master.
2014-05-15 20:01:31 +02:00
Tim Graham
f8fa735dc2
[1.7.x] Fixed #22435 -- Prevented adding a ManyToManyField from prompting for a default.
...
Thanks andrewsg for the report.
Backport of 3818d96426 from master
2014-05-02 20:53:39 -04:00
Chris Beaven
5ab93bbe74
[1.7.x] Fix migration autodector to work correctly with custom deconstructed values
2014-05-02 15:12:42 +12:00
Tim Graham
9e86c3f0a6
[1.7.x] Fixed flake8 errors.
...
Backport of 471fb04a30 from master
2014-04-20 13:09:12 -04:00
Andrew Gorcester
bc5d568e1e
[1.7.x] 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.
Backport of 956bd64424 from master
2014-04-18 18:34:00 -04:00
Loic Bistuer
8e73d3a2c1
[1.7.x] Fixed #22319 -- Fixed migration external dependencies when there are internal dependencies.
...
Backport of 0fd51cf0bd from master
2014-03-31 06:57:44 -04:00
Loic Bistuer
39fc8d4b8e
[1.7.x] 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.
Backport of 42336c84a0daedfd8242333622eefe202e32398e from master
2014-03-25 20:04:49 -04:00
Stephen Burrows
b4f165fe94
[1.7.x] Fixed #22300 -- Fixed crash in migrations when changing non-relational field to relational.
...
Backport of 35ed792cf2 from master
2014-03-25 07:46:48 -04:00