Commit Graph

216 Commits

Author SHA1 Message Date
Colin Wood 27ee608b55 Fixed #22940 -- Added missing string iterpolation parameters in migrations.writer error.
Forwardport of f5740af868 from stable/1.7.x
2014-07-02 12:45:02 -04:00
Tim Graham 70576740b0 Fixed #22917 -- Fixed typo in AlterIndexTogether.describe(). 2014-06-27 10:34:48 -04:00
Tim Graham e0cd07ec2f Fixed #22903 -- Fixed migration generation if index_together or unique_together is removed from a model. 2014-06-25 10:02:12 -04:00
Andrew Godwin fe262c0b84 Fixed #22708: Typo in autodetector base dependency gen 2014-06-23 20:48:33 -07:00
Tim Graham 908160f692 Fixed test failures introduced by refs #22881. 2014-06-23 09:59:36 -04:00
Chris Beaven 21c496ea52 Fixed #22881 -- Better soft_applied migration detection 2014-06-23 13:36:22 +12:00
Andrew Godwin b30d32ff24 Fixed #22875: Optimizer did not take through= into account. 2014-06-22 11:23:45 -07:00
Tim Graham 9a46836a0c Moved a line outside of try/except to prevent an error in finally.
Thanks Ian Foote.
2014-06-20 09:13:34 -04:00
Huu Nguyen fbb684d95e Fixed #22862 -- Added --noinput option to makemigrations.
Thanks artortenburger for the report.
2014-06-20 08:55:02 -04:00
Alex Gaynor d015c9d11c Fixed several flake8 errors 2014-06-18 07:47:13 -07:00
Andrew Godwin 2cee1d4642 Fixed #22861: Internal migrations done first so __first__ works
Thanks to Chris Beaven.
2014-06-17 23:28:35 -07:00
Andrew Godwin 09b63a7cce Fix __latest__ to actually resolve to the latest migration 2014-06-17 22:12:31 -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 77ff4a9360 Fix previous commit on python 2 2014-06-17 09:56:22 -07:00
Víðir Valberg Guðmundsson 3a6cb9f497 Fixed #22577: Python 3 broke on non-module migrations directory 2014-06-17 18:21:38 +02:00
Tim Graham 317c480c04 Removed some u'' prefixes to fix Python 3.2. 2014-06-16 18:49:37 -04:00
Tim Graham b341f33697 Added database migration for contrib.auth.
refs #22170.
2014-06-16 16:21:37 -04:00
Tim Graham eb8600a656 Added database migration for contrib.contenttypes.
Moved contenttypes tests to allow them to run correctly in the presence of
migrations. refs #22170.
2014-06-16 15:03:00 -04:00
Andrew Godwin 067b9668fb Fixed #22783: Make sure swappable models come first in creation 2014-06-16 10:20:05 -07:00
Matthew Schinckel bb39037fcb Fixed #22788 -- Ensured custom migration operations can be written.
This inspects the migration operation, and if it is not in the
django.db.migrations module, it adds the relevant imports to the
migration writer and uses the correct class name.
2014-06-16 12:28:52 -04:00
Tim Graham 808388c28c Removed usaged of contrib.sessions as a placeholder in migration tests.
Without this, we're unable to add actual migrations for the app.
2014-06-16 10:15:19 -04: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 f717ef083a Fixed #22833: Autodetector not doing through mapping correctly 2014-06-15 12:06:48 -07:00
Andrew Godwin 7b17350a1b Fixed #22823 (and partly #22563) - FKs from unmigrated apps breaking state.
Thanks to bendavis78 for the test and diagnostic work.
2014-06-12 10:22:43 -07:00
Andrew Godwin f146e70cb1 Remove overzealous migration flushes from migration test suite 2014-06-09 09:52:23 -07:00
Andrew Godwin 3f91238adf Fixed #22777: Add dependency on through for autodetected M2M adds 2014-06-08 17:12:59 -07:00
Andrew Godwin 4ce7a6bc84 Fixed #22750, #22248: Model renaming now also alters field FKs 2014-06-07 18:18:02 -07:00
Andrew Godwin 6fd455adfc Fixed #22436: More careful checking on method ref'ce serialization 2014-06-07 17:05:51 -07:00
Andrew Godwin aa12ea05ce Rewrote migration autodetector to involve actual computer science.
Fixes #22605, #22735; also lays the ground for some other fixes.
2014-06-05 23:25:35 -07:00
Andrew Godwin 5826dc5282 Merge pull request #2736 from SmileyChris/migration-run_before
Fixed #22725 - Migration.run_before does nothing
2014-06-05 20:29:26 -07:00
Simon Charette 7a38f88922 Fixed #22659 -- Prevent model states from sharing field instances.
Thanks to Trac alias tbartelmess for the report and the test project.
2014-06-01 15:10:38 -04:00
Moayad Mardini 6f4d7f41b1 Improved the test for refs #22682.
Thanks apollo13 for the review.
2014-05-30 11:00:13 -04:00
Andrew Godwin 9cbf7f25ef Fix additional test failures caused by migration pollution 2014-05-29 16:44:12 -07:00
Moayad Mardini 56cfa508c7 Fixed #22682 -- `makemigrations` will create `MIGRATION_MODULES` package
`makemigrations` will automatically create the package specified
in `MIGRATION_MODULES` if it doesn't already exist.

Thanks ovidiuc4 for the report.
2014-05-30 01:23:09 +03:00
Chris Beaven 45fa520187 Implement Migration.run_before
This attribute (used for reverse dependencies) was previously declared
and mentioned in the code, but never actually used.
2014-05-29 22:42:11 +12:00
Moayad Mardini 2e613ea5c5 Fixed #22675 -- makemigrations --dry-run to output migrations to stdout.
`makemigrations --dry-run` will output the complete migrations file
that would be written if it's used along with `--verbosity 3`.
2014-05-27 00:40:55 +03:00
Moayad Mardini 63fc91b3ca Fixed #22676 -- makemigrations --dry-run should not ask for defaults
Made the fix in InteractiveMigrationQuestioner class code, rather than
MigrationAutodetector, because --dry-run shouldn't affect whether
MigrationAutodetector will detect non-nullable fields, but the
questioner should skip the question and returns a None for default
(since that won't be used anyway) if --dry-run is used.
2014-05-24 09:56:18 -04:00
Baptiste Mispelon f01d2a8f9b Fixed tuple serialization test.
Thanks to rockallite for the report.
2014-05-23 14:50:10 +02:00
Huu Nguyen f851a954ac Fixed #22602 -- Improved code coverage of makemigrations command tests. 2014-05-23 08:05:46 -04:00
Flavio Curella beec05686c Fixed #22667 -- Replaced leader/follower terminology with primary/replica 2014-05-22 11:59:17 -04:00
Moayad Mardini ad994a3c5b Fixed #22679 -- Fixed empty tuple serialization in MigrationWriter.
Thanks rockallite.wulf for the report.
2014-05-22 16:15:09 +02:00
Marc Tamlyn 6ab67919ac Made nested deconstruction support both forms of deconstruct()
Nested deconstruction should (silently) handle Field.deconstruct() as
well as other arbitrary deconstructable objects. This allows having a
field in the deconstruction of another field.
2014-05-22 13:23:51 +01: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