Commit Graph

252 Commits

Author SHA1 Message Date
Tim Graham 0f52bf7c96 [1.7.x] Fixed some flake8 errors.
Backport of 9d30412a5a from master
2014-09-19 12:33:44 -04:00
valtron 563eaf0499 [1.7.x] Fixed #23474 -- Prevented migrating backwards from unapplying the wrong migrations.
Backport of abcf28a076 from master
2014-09-15 15:06:21 -04:00
Carl Meyer ac1adfbe4a [1.7.x] Fixed #23483 -- Prevented ImproperlyConfigured with dotted app names
Made sure the app labels stay unique for the AppConfigStubs, so
migrations wouldn't fail if two dotted app names has the same last part
(e.g. django.contrib.auth and vendor.auth)

Backport of 5e32605ce9 from master.
2014-09-12 15:34:42 -06:00
Markus Bertheau 35cd0854f9 [1.7.x] Corrected grammar in migrations error message.
Backport of 61f56e239f from master
2014-09-10 10:34:32 -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
Markus Holtermann 1f1a329288 [1.7.x] Fixed broken test from da160d440f; refs #23418.
Backport of 16548cfc7c from master
2014-09-08 16:51:34 -04:00
Markus Holtermann b0def3bcac [1.7.x] Fixed #23418 -- Fail when migration deconstruct produces invalid import
Backport of d28b5f13b3 from master
2014-09-08 15:41:14 -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
Andrew Godwin de3a3096d8 [1.7.x] Fix Python 3 incompatability 2014-09-05 15:48:20 -07:00
Ben Reilly 4ca44d5e10 [1.7.x] switch out recursive dfs for stack based approach, to avoid possibly hitting the recursion limit 2014-09-05 15:39:47 -07:00
Dave Hall 7eabd22217 [1.7.x] Fixed #22918 -- Fixed SeparateDatabaseAndState crash
Backport of e03b7940e5 from master
2014-09-02 08:11:45 -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
Raffaele Salmaso 4ae75cf051 [1.7.x] Fixed #23352 -- Added tests for MigrationGraph.{forwards,backwards}_plan
Backport of be4baaefe2 from master
2014-08-23 21:36:08 +00: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
Lee Sanghyuck 6e5e2b0e28 [1.7.x] Fixed #23316 -- Added datetime.time serialization in migrations.
Backport of 11d9cbe2f4 from master
2014-08-19 13:32:05 -04:00
Baptiste Mispelon 24d9aee188 [1.7.x] Fixed broken tests on Oracle after 5853c87a45.
Oracle doesn't have a `BEGIN` statement so the test would
fail.

Refs #23303

Backport of 54164b814c from master.
2014-08-19 18:00:39 +02:00
Baptiste Mispelon 3a80189479 [1.7.x] Fixed #23303 -- Added BEGIN and COMMIT statements to the output of sqlmigrate.
Backport of 5853c87a45 from master.

Conflicts:
	django/core/management/commands/sqlmigrate.py
	tests/user_commands/tests.py
2014-08-18 19:36:34 +02:00
Tim Graham 6011f24503 [1.7.x] Fixed typo in tests/migrations/test_operations.py
Backport of 0ad4672c0f from master
2014-08-15 11:02:18 -04: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 0e69af51b1 [1.7.x] Fixed #23244: Error altering FK to non-FK in migrations 2014-08-07 11:52:49 +10:00
Andrew Godwin a918c60c37 [1.7.x] Fixed #23091: CreateModel and AddField were clashing with deferred SQL 2014-08-04 11:59:48 +10:00
Simon Charette 99f3a65c73 [1.7.x] Fixed a MySQL test failure introduced by cbb29af1aa.
Seems like unlike other backends MySQL get_constraints fails when dealing
with a non-existing table. refs #23160.

Backport of 1b00738f73 from master
2014-08-03 17:02:49 -04:00
Simon Charette 6b2473d3e8 [1.7.x] Fixed #23160 -- Correctly rename models with self referential fields.
Thanks to whitews AT gmail for the report.

Backport of cbb29af1aa from master
2014-08-03 17:02:41 -04: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
Andrew Godwin 919d10e619 [1.7.x] Fixed #23093: soft application detection for swapped models 2014-07-25 09:35:53 -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
Tim Graham c86b9d1985 [1.7.x] Silenced a Python 2 ImportWarning in a migrations test.
Backport of 66211b4b75 from master
2014-07-24 09:29:45 -04:00
Andrew Godwin e2220c1c08 [1.7.x] Fixed #23014: Renaming not atomic with unique together 2014-07-21 11:37:10 +01:00
Andrew Godwin f57e84392e [1.7.x] Fixed #22975: Don't call rename SQL if not needed 2014-07-21 10:14:34 +01: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 01515ebaa4 [1.7.x] Fixed #23013 -- Fixed removing unique_together/index_together constraints in migrations.
Thanks melinath for the report.

Backport of 0154965392 from master
2014-07-15 15:21:44 -04: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
Huu Nguyen 6d5238f6c8 [1.7.x] Fixed #22791 -- Invoke interactive questioner only for conflicts in specified apps.
Thanks bendavis78 for the report and Tim Graham for the review.

Backport of f7a78f9bba from master
2014-07-14 13:00:45 -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
Loic Bistuer a1ddfe4401 [1.7.x] Fixed #22906 -- Added a more helpful repr to migrations' ModelState.
Thanks Collin Anderson for the report and original patch.

Backport of 2572c07cc6 from master
2014-07-06 15:00:03 +07:00
Simon Charette 2f0cc4f5fb [1.7.x] Fixed #22943 -- Correctly serialize compiled regexes.
Thanks to antialiasis at gmail dot com for the patch.
2014-07-05 16:38:34 -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
Colin Wood f5740af868 [1.7.x] Fixed #22940 -- Added missing string iterpolation parameters in migrations.writer error. 2014-07-02 12:44:10 -04:00
Tim Graham 54fdf5901b [1.7.x] Fixed #22917 -- Fixed typo in AlterIndexTogether.describe().
Backport of 70576740b0 from master
2014-06-27 10:36:05 -04: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
Tim Graham 21c9591384 [1.7.x] Fixed test failures introduced by refs #22881.
Backport of 908160f692 from master
2014-06-23 10:00:54 -04:00
Chris Beaven 29582ad4a3 [1.7.x] Fixed #22881 -- Better soft_applied migration detection 2014-06-23 13:30:29 +12:00