1
0
mirror of https://github.com/django/django.git synced 2025-03-19 13:50:45 +00:00

287 Commits

Author SHA1 Message Date
Tim Graham
065b2a82f6 [1.7.x] Fixed #24135 -- Made RenameModel rename many-to-many tables.
Thanks Simon and Markus for reviews.

Backport of 28db4af80a319485c0da724d692e2f8396aa57e3 from master
2015-01-15 20:43:49 -05:00
Markus Holtermann
ef5889409b [1.7.x] Fixed #24110 -- Rewrote migration unapply to preserve intermediate states
Backport of fdc2cc948725866212a9bcc97b9b7cf21bb49b90 and be158e36251df0b07556657da47cdaf10913c57a from master
2015-01-11 00:35:49 +01:00
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
Oscar Ramirez
1ad5deedd4 [1.7.x] Fixed #23998 -- Added datetime.time support to migrations questioner.
Backport of 54085b0f9ba7d9f705f9b9c90d3433b0ef6aa042 from master
2014-12-22 07:26:57 -05:00
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 3dbbb8a89ca4beaabd5359fe82e32ed633b15140 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 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
Gavin Wahl
e9975ed3cd [1.7.x] Fixed #23950 -- Prevented calling deconstruct on classes in MigrationWriter.
Backport of dee4d23f7e703aec2d1244e4facbf7f4c88deed5 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 392e11945fa246d751d23bb515703fcaf55dfa26 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 d2202ec2d4d0477b682c6d0051f27ab4843ef89f 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 47b7f601eeb93bd7a91f87b77da658212f2f2314 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 ff3d746e8d8e8fbe6de287bd0f4c3a9fa23c18dc from master, with
additional tests from c5def493d0993d65bf7d96f0a204006cbeaa6178
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 72729f844e0dd9bd01b3874171b89ab0d136a40e 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 7b4a994599b75a07cb07d1e0cc26b3bbf25ab7a6

Backport of 4c709cc0ef0daa2b527e056865f51796fb0d42f3 from master
2014-11-20 14:44:05 -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
Carl Meyer
03e8c18288 [1.7.x] Fixed #23410 -- Avoided unnecessary rollbacks in related apps when migrating backwards.
Backport of ab2819aa7b09d36d9ff24830a9825aa52b87fdb4 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 d18810131995dac63f9d89b0beaeadfc935130aa 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 7b4a994599b75a07cb07d1e0cc26b3bbf25ab7a6 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 c7c098cf97fbb1416f302c76799058ad63a5f7aa 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