Commit Graph

280 Commits

Author SHA1 Message Date
Andriy Sokolovskiy 10482faf19 [1.7.x] Fixed #23983 -- Fixed a crash in migrations when adding order_with_respect_to to non-empty table.
Backport of 3dbbb8a89c from master
2014-12-16 10:56:35 -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 d8f3b86a76 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 44927ba817 from master
2014-12-11 13:28:57 -05:00
Gavin Wahl e9975ed3cd [1.7.x] Fixed #23950 -- Prevented calling deconstruct on classes in MigrationWriter.
Backport of dee4d23f7e from master
2014-12-03 08:32:59 -05:00
Claude Paroz 3a42d9730c [1.7.x] Fixed #23909 -- Prevented crash when collecting SQL for RunSQL
Thanks James Rivett-Carnac for the report and Markus Holtermann
for the review.
Backport of e11c6fd21 from master.
2014-12-02 09:02:54 +01:00
Tim Graham 943b1047de [1.7.x] Fixed flake8 warnings.
Backport of 392e11945f from master
2014-12-01 16:01:18 -05:00
Markus Holtermann ba3e976186 [1.7.x] Fixed #23880 -- Added missing index_together handling for SQLite
Backport of d2202ec2d4 from master
2014-12-01 16:00:36 -05:00
Carl Meyer 6f65bd1cf0 [1.7.x] Fixed #23872 -- Removed sensitivity of migrations tests to CWD.
Backport of 47b7f601ee from master.
2014-11-26 17:36:04 -07:00
Luke Plant 8e3c3be32d [1.7.x] Fixed bug in circular dependency algo for migration dependencies.
Previous algo only worked if the first item was a part of the loop,
and you would get an infinite loop otherwise (see test).

To fix this, it was much easier to do a pre-pass.

A bonus is that you now get an error message that actually helps you debug
the dependency problem.

Backport of ff3d746e8d from master, with
additional tests from c5def493d0
2014-11-26 08:15:33 +00: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 72729f844e from master
2014-11-21 10:57:38 -05:00
Markus Holtermann 145467a636 [1.7.x] Fixed duplicate index error on Oracle; refs #23859.
Refers to regression introduced in 7b4a994599

Backport of 4c709cc0ef from master
2014-11-20 14:44:05 -05:00
Markus Holtermann 1b8c067a4f [1.7.x] Cleaned up and reformatted autodetector tests
Backport of 2331650835 from master.
2014-11-19 18:25:00 -05:00
Markus Holtermann 2f8cd09a06 [1.7.x] Formatted model states in autodetector tests
Backport of f17acd5930 from master.
2014-11-19 18:25:00 -05:00
Carl Meyer 03e8c18288 [1.7.x] Fixed #23410 -- Avoided unnecessary rollbacks in related apps when migrating backwards.
Backport of ab2819aa7b from master.
2014-11-19 16:15:05 -07:00
Stratos Moros 50434aebe2 [1.7.x] Fixed #22248 -- Made RenameModel reversible
Backport of cf7a2a000e from master
2014-11-19 09:51:07 -05:00
Tillmann Karras dfcac7d7f5 [1.7.x] Fixed #23799 -- Made makemigrations respect --no-optimize.
Thanks to yamila-moreno for the idea of a skip message.

Backport of d188101319 from master
2014-11-18 09:20:04 +01:00
Markus Holtermann 03d983f7c3 [1.7.x] Fixed #23859 -- Fixed a migration crash when a field is renamed that is part of an index_together
Backport of 7b4a994599 from master.
2014-11-17 15:57:19 -07:00
Markus Holtermann 1f50ea730e [1.7.x] Fixed #23770 -- Changed serialization strategy for floats with respect to NaN and Inf
Thanks to w0rp for the report

Backport of c7c098cf97 from master.
2014-11-06 15:31:30 +01: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
Tim Graham f70a733abc [1.7.x] Fixed #23630 -- Made AlterModelTable rename auto-created M2M tables.
Thanks Naddiseo for the report, Andrew Godwin for guidance,
and Shai Berger for review.

Backport of 41b337efa0 from master
2014-10-23 08:51:08 -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
Rudy Mutter e31be40f16 [1.7.x] Fixed #23365 -- Added support for timezone-aware datetimes to migrations.
Backport of a407b846b4 from master
2014-10-09 22:39:17 +07:00
Loic Bistuer 7355885ef5 [1.7.x] Fixed #23560 -- Fixed MigrationWrite to handle builtin types without imports.
Thanks Tim Graham for the review.

Backport of b23d47412c from master
2014-09-27 00:40:35 +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
Tim Graham d7b32d3120 [1.7.x] Revert "Fixed #23474 -- Prevented migrating backwards from unapplying the wrong migrations."
Backport of d7ab2cefb7 from master
2014-09-24 15:56:24 -04:00
Markus Holtermann ae14c75014 [1.7.x] Fixed #23426 -- Don't require double percent sign in RunSQL without parameters
Backport of b9a670b227 from master
2014-09-24 07:21:50 -04:00
Sergey Fedoseev 991ec655b6 [1.7.x] Fixed #23503 -- Fixed renaming of model with self-referential m2m field.
Backport of 463952d940 from master
2014-09-23 10:12:10 -04:00
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