Commit Graph

86 Commits

Author SHA1 Message Date
Alex Gaynor e5b7045422 flake8 fixes 2013-11-06 20:00:48 -08:00
Andrew Godwin 106b019dc9 Massive migration optimiser improvements + RenameModel opn 2013-11-06 13:47:58 +00:00
Alex Gaynor c347f78cc1 Fixed all E226 violations 2013-11-03 10:08:55 -08:00
Milton Mazzarri cbc7cbbc5b Fixed flake8 E251 violations 2013-11-03 03:22:11 -06:00
Alex Gaynor 7548aa8ffd More attacking E302 violators 2013-11-02 13:12:09 -07:00
Tim Graham 36ded01527 Fixed #21302 -- Fixed unused imports and import *. 2013-11-02 15:24:56 -04:00
Andrew Godwin e9cb333bc3 Auto-apply initial migrations if their tables exist already. 2013-10-30 15:17:49 +00:00
Baptiste Mispelon 497930b7f6 Use `callable` instead of `six.callable`.
The `callable` builtin was added back in python 3.2
which is the minimal python3 version supported by django
at this point.
2013-10-29 21:53:51 +01:00
Andrew Godwin 5ab8b5d72c Fix migration planner to fully understand squashed migrations. And test. 2013-10-23 22:56:54 +01:00
Alasdair Nicol c3aa2948c6 Fixed #21298 -- Fixed E301 pep8 warnings 2013-10-23 13:45:03 +01:00
Loic Bistuer e565e1332d Fixed #21275 -- Fixed a serializer error when generating migrations for contrib.auth.
The migration serializer now looks for a deconstruct method on any object.
2013-10-21 14:54:52 -04:00
Loic Bistuer 8d6953d55c Added support for serializing class methods. - Refs #21290.
The new handling allows us to do away with the whitelisting that was
required to support date and datetime objects.
2013-10-19 12:10:18 -04:00
Loic Bistuer 584110417f Fixed #21283 -- Added support for migrations if models is a package.
Thanks Markus Holtermann for the report.
2013-10-19 09:48:57 -04:00
Andrew Godwin 763ac8b642 First pass on squashmigrations command; files are right, execution not. 2013-10-16 12:00:07 +01:00
Andrew Godwin 42f8666f6a Improve migration optimizer to be able to optimize through other ops 2013-10-16 11:09:33 +01:00
Florian Apolloner ed8919cbcb Handle Apps with South migrations as unmigrated apps. 2013-10-15 11:57:30 +02:00
Tim Graham adedc31072 Fixed "redefinition of unused 'foo' from line X" pyflakes warnings. 2013-10-10 11:09:42 -04:00
Javed Khan 4dbd95ad65 Fixed #21236 -- Allowed migrations to work with unique_together tuples.
Thanks hjwp for the report.
2013-10-07 09:39:14 -04:00
Andrew Godwin a80d9ab0fe Initial version of MigrationOptimizer and tests 2013-10-02 17:34:22 +01:00
Andrew Godwin 6d3faba2d2 Add reverse_code optional argument to RunPython 2013-09-25 17:21:20 +01:00
Andrew Godwin fe9f342d8c Allow callables as the argument to RunPython 2013-09-25 16:10:43 +01:00
Andrew Godwin 8a3e543f26 Make sqlmigrate ignore the RunPython operation 2013-09-25 14:37:44 +01:00
Andrew Godwin 3b810c5656 Add RunPython migration operation and tests 2013-09-25 13:58:07 +01:00
Andrew Godwin 05656f2388 Add equality support for Project/ModelState 2013-09-25 13:47:46 +01:00
Markus Holtermann 5a424c2393 Fixed #21114 -- Migrations must not have a dependency to themselves. 2013-09-17 11:47:19 -04:00
Alex Gaynor bac86ad1a3 REmoved some unused imports 2013-09-14 12:34:57 -07:00
Gregor MacGregor b2b763448f Fixed #20841 -- Added messages to NotImplementedErrors
Thanks joseph at vertstudios.com for the suggestion.
2013-09-10 11:09:59 -04:00
Loic Bistuer d59f1993f1 Made MigrationWriter look for a "deconstruct" attribute on functions.
Refs #20978.
2013-09-10 10:12:23 -04:00
Andrew Godwin bacbbb481d RunSQL migration operation and alpha SeparateDatabaseAndState op'n. 2013-09-07 11:03:38 -05:00
Loic Bistuer adc0ab3386 Fixed #21037 -- Made MigrationWriter raise a ValueError when serializing lambda functions. 2013-09-06 20:13:01 -04:00
Andrew Godwin efd1e6096e Adding 'sqlmigrate' command and quote_parameter to support it. 2013-09-06 15:28:12 -05:00
Andrew Godwin 05e14e8eaf Migration autodetector now corerctly deals with proxy models 2013-09-06 12:39:46 -05:00
Andrew Godwin cdeff3acc2 Project/ModelState now correctly serialize multi-model inheritance 2013-09-06 12:16:03 -05:00
Andrew Godwin 9f6e6009a4 Add --list option to migrate command 2013-09-06 11:06:19 -05:00
Andrew Godwin 32838a5beb Make db.migrations ignore South-style migrations. 2013-09-06 10:35:53 -05:00
Loic Bistuer e1266e50b2 Fixed #21015 -- Fixed MigrationLoader when importlib.import_module returns a file module or an empty directory. 2013-09-06 08:30:19 -04:00
Loic Bistuer 82bbb9fe81 Fixed #21014 -- Fixed gobbled ImportError in MigrationLoader. 2013-09-06 08:30:18 -04:00
Loic Bistuer 34d52fd32e Fixed #21010 -- Changed ModelState to only copy _meta.local_fields. 2013-09-04 14:05:59 -04:00
Loic Bistuer ff9e116198 Fixed #21008 -- Made MigrationWriter handle Promise objects. 2013-08-31 20:26:44 -04:00
Simon Charette 11cd7388f7 Fixed #20989 -- Removed useless explicit list comprehensions. 2013-08-30 10:57:51 -04:00
Andrew Godwin 2e7f45a372 Change autodetector changes API to be just one method 2013-08-21 22:25:15 +01:00
Andrew Godwin b61b634628 Fix weird planning issues when already fully migrated. 2013-08-11 15:28:51 +01:00
Andrew Godwin 21be9fef7b Stop being overcautious about Field.rel 2013-08-11 00:01:30 +01:00
Andrew Godwin 7970d97a70 Docs tweaks (thanks timgraham) 2013-08-10 20:00:12 +01:00
Andrew Godwin 9b4a789eef Add [y/n] to autodetector questions and allow for default value 2013-08-09 17:45:19 +01:00
Andrew Godwin 9f73629420 utils.importlib is deprecated 2013-08-09 17:36:16 +01:00
Andrew Godwin fddc5957c5 Implement allow_migrate for migration operations 2013-07-30 12:34:31 +01:00
Andrew Godwin c8cbdabfab Fix Python 3 support 2013-07-26 17:08:12 +01:00
Andrew Godwin 52643a69e3 Add --fake option to migrate 2013-07-26 16:47:00 +01:00
Andrew Godwin 3f7113f1d9 Fix timezone warnings if USE_TZ=True 2013-07-26 16:46:48 +01:00