1
0
mirror of https://github.com/django/django.git synced 2024-12-27 03:25:58 +00:00
Commit Graph

91 Commits

Author SHA1 Message Date
Claude Paroz
70428902c0 Added missing available app in migrations test case
In some test combinations, having contrib.auth available but not
contrib.contenttypes can produce failures while creating permissions.
2014-10-23 15:39:26 +02:00
Tim Graham
41b337efa0 Fixed #23630 -- Made AlterModelTable rename auto-created M2M tables.
Thanks Naddiseo for the report, Andrew Godwin for guidance,
and Shai Berger for review.
2014-10-23 08:05:39 -04:00
Collin Anderson
4ef9618e12 Avoided requiring sqlparse for a test.
Refs #23426. Thanks Markus Holtermann for the suggestion.
2014-10-09 14:59:33 -04:00
Collin Anderson
d6a87eefd8 Skip another test if sqlparse is not available
Refs #23426
2014-10-09 11:54:42 -04:00
Markus Holtermann
85f6d89313 Fixed #23426 -- Allowed parameters in migrations.RunSQL
Thanks tchaumeny and Loic for reviews.
2014-10-02 11:52:40 -04:00
Markus Holtermann
b9a670b227 Fixed #23426 -- Don't require double percent sign in RunSQL without parameters 2014-09-24 07:20:57 -04:00
Sergey Fedoseev
463952d940 Fixed #23503 -- Fixed renaming of model with self-referential m2m field. 2014-09-23 10:03:37 -04:00
Dave Hall
e03b7940e5 Fixed #22918 -- Fixed SeparateDatabaseAndState crash 2014-09-02 08:06:44 -04:00
Tim Graham
0ad4672c0f Fixed typo in tests/migrations/test_operations.py 2014-08-15 11:01:49 -04:00
Andrew Godwin
8f9862cd4d Fixed #23275: Unmanaged models kept by autodetector, ignored by ops 2014-08-12 12:49:20 -07:00
Andrew Godwin
dfe86449c9 Fixed #23244: Error altering FK to non-FK in migrations 2014-08-07 11:52:31 +10:00
Andrew Godwin
c06e124b5e Fixed #23091: CreateModel and AddField were clashing with deferred SQL 2014-08-04 11:59:29 +10:00
Simon Charette
1b00738f73 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.
2014-08-03 16:32:36 -04:00
Simon Charette
cbb29af1aa Fixed #23160 -- Correctly rename models with self referential fields.
Thanks to whitews AT gmail for the report.
2014-08-03 15:27:01 -04:00
Andrew Godwin
d6e73a876d Fixed #23121: AlterModelOptions operation not changing state right 2014-07-28 10:47:28 -07:00
Andrew Godwin
e24e9e0438 Fixed #23014: Renaming not atomic with unique together 2014-07-21 11:36:34 +01:00
Andrew Godwin
dcb4ed5170 Fixed #22975: Don't call rename SQL if not needed 2014-07-21 10:14:00 +01:00
Tim Graham
0154965392 Fixed #23013 -- Fixed removing unique_together/index_together constraints in migrations.
Thanks melinath for the report.
2014-07-15 15:20:59 -04:00
Tim Graham
70576740b0 Fixed #22917 -- Fixed typo in AlterIndexTogether.describe(). 2014-06-27 10:34:48 -04:00
Alex Gaynor
d015c9d11c Fixed several flake8 errors 2014-06-18 07:47:13 -07:00
Andrew Godwin
405b9dcd8b Fix broken test 2014-06-17 21:32:23 -07:00
Andrew Godwin
8d2ac948a9 Fixed #22853: Swapped models are now ignored for migration operations. 2014-06-17 17:45:38 -07:00
Andrew Godwin
c8c79367a2 Fixed #22844: Duplicate SQL for SQLite FKs 2014-06-16 00:27:32 -07:00
Alex Gaynor
d17a4cb037 Fixed several flake8 errors 2014-06-15 20:45:15 -04:00
Andrew Godwin
c1276785f9 Fixed #22568: Better proxy model support in migrations 2014-06-15 16:01:49 -07:00
Andrew Godwin
a8ce5fdc28 Fixed #22470: Full migration support for order_with_respect_to 2014-06-15 14:56:51 -07:00
Andrew Godwin
a58f49d104 Persist non-schema-relevant Meta changes in migrations 2014-06-15 12:34:02 -07:00
Andrew Godwin
4ce7a6bc84 Fixed #22750, #22248: Model renaming now also alters field FKs 2014-06-07 18:18:02 -07:00
Flavio Curella
beec05686c Fixed #22667 -- Replaced leader/follower terminology with primary/replica 2014-05-22 11:59:17 -04:00
Tim Graham
dfeef8e147 Skipped a migrations test that's not supported on MySQL + Python 3. 2014-05-21 06:54:24 -04:00
Alex Gaynor
8a95b4fca7 Merge pull request #2692 from fcurella/patch-5
#22667 replaced occurrences of master/slave terminology with leader/follower
2014-05-20 09:37:04 -07:00
Flavio Curella
73a57b06f9 replaced occurrences of master/slave terminology with leader/follower 2014-05-20 11:35:16 -05:00
Andrew Godwin
03900a02d5 Fixed #22432: SQLite M2M repointing now works. Thanks to xelnor. 2014-05-20 16:25:59 +01:00
Loic Bistuer
5789ff7330 Failing testcases for #22649. 2014-05-18 12:46:12 +07:00
Loic Bistuer
1d3d01b4f7 Fixed #22424 -- Fixed handling of default values for TextField/BinaryField on MySQL.
Thanks syphar for the review and suggestions.
2014-05-18 11:58:16 +07:00
Aymeric Augustin
b1432bfc22 Appeased flake8. 2014-05-08 21:49:54 +02:00
Andrew Godwin
5a917cfef3 Fixed #22496: Data migrations get transactions again! 2014-05-07 14:28:34 -07:00
Aymeric Augustin
8b5b199e20 Fixed #3214 -- Stopped parsing SQL with regex.
Avoided introducing a new regex-based SQL splitter in the migrations
framework, before we're bound by backwards compatibility.

Adapted this change to the legacy "initial SQL data" feature, even
though it's already deprecated, in order to facilitate the transition
to migrations.

sqlparse becomes mandatory for RunSQL on some databases (all but
PostgreSQL). There's no API to provide a single statement and tell
Django not to attempt splitting. Since we have a more robust splitting
implementation, that seems like a good tradeoff. It's easier to add a
new keyword argument later if necessary than to remove one.

Many people contributed to both tickets, thank you all, and especially
Claude for the review.

Refs #22401.
2014-04-26 17:46:23 +02:00
Claude Paroz
ab90c4707b Fixed table cleanup in GIS migration tests 2014-04-21 23:08:00 +02: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
Motiejus Jakštys
0e45669fa9 Fixed #22460 -- Explicity remove constraints when dropping a related field. 2014-04-16 15:38:31 -04:00
Loic Bistuer
a449e7feec Fixed #22359 -- Changing M2M field to blank=True failed on sqlite. 2014-03-31 06:13:19 -04:00
Andrew Godwin
f4d91638fc Remove failing test while we fix the underlying bug 2014-03-11 10:33:57 -07:00
Chris Beaven
107c9f5453 Fix AlterField migrations that are related to a RenameModel migration 2014-03-11 17:13:26 +13:00
Andrew Godwin
abccbcf52d Fixed #21843: Remove explicit ID column setting in test 2014-03-08 16:04:21 -08:00
Andrew Godwin
cdf6eba181 Merge pull request #2315 from bendavis78/issues/22073
Fixed #22073 - Ensure CreateTable operation handles backwards migration correctly when M2M fields are present
2014-03-08 15:44:45 -08:00
Alex Gaynor
a248c88372 Fixed three small flake8 violations. 2014-03-04 15:13:15 -08:00
Loic Bistuer
99291f5db0 Added tests for MTI in RunPython. 2014-03-05 03:17:52 +07:00