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
Simon Charette
72d3889db4
Fixed #22350 -- Consistently serialize bytes and text in migrations.
...
Thanks to @treyhunner and Loïc for their suggestions and review.
2014-04-13 18:22:26 -04:00
Simon Charette
074d3183d9
Fixed #22363 -- Correctly serialize `django.utils.datetime_safe` objects.
...
Thanks to linovia for the report.
2014-04-03 14:54:16 -04:00
Loic Bistuer
0fd51cf0bd
Fixed #22319 -- Fixed migration external dependencies when there are internal dependencies.
2014-03-31 06:50:38 -04:00
Tim Graham
42336c84a0
Fixed #22331 -- Made MigrationAutodetector ignore unmanaged models.
...
This commit reverts 69d4b1c
and tackle the issue from a different angle.
Models remain present in the project state, but are now ignored by the
autodetector.
2014-03-25 18:30:58 -04:00
Loic Bistuer
69d4b1c3ea
Fixed #22331 -- Fixed migrations ProjectState to ignore unmanaged models.
2014-03-25 10:33:44 -04:00
Stephen Burrows
35ed792cf2
Fixed #22300 -- Fixed crash in migrations when changing non-relational field to relational.
2014-03-25 07:46:15 -04:00
Andrew Godwin
831ce69cbb
Mark model renaming as irreversible for now ( #22248 )
2014-03-19 21:25:26 -07:00
Andrew Godwin
81f5408c7a
Fixed #22275 : unique_together broken if ForeignKey split into new file.
...
Thanks to bak1an for the patch.
2014-03-19 21:23:21 -07:00
Chris Beaven
107c9f5453
Fix AlterField migrations that are related to a RenameModel migration
2014-03-11 17:13:26 +13:00
Chris Beaven
40f6ca54f8
Fix autodetector creation of RenameModel migration to capitalize model names
2014-03-11 12:23:45 +13:00
Chris Beaven
7feb70eef3
Fixed #22239 -- Add auto detection of renamed models
2014-03-10 13:55:44 +13:00
Andrew Godwin
28779abb75
Fix bad conflict detection during makemigrations
2014-03-08 13:53:20 -08:00
Andrew Godwin
1232acb884
Don't allow really long migration names
2014-03-06 13:34:31 -08:00
Andrew Godwin
e46e15e5a1
Fixed #22204 : Bad circular-dep-breaking if more than one per run
2014-03-06 13:22:42 -08:00
Alex Gaynor
a248c88372
Fixed three small flake8 violations.
2014-03-04 15:13:15 -08:00
Loic Bistuer
6436f1fad9
Fixed #21893 -- ModelState didn't account for MTI parents inherited from abstract models.
2014-03-05 03:25:14 +07:00
Rodolfo Carvalho
0d91225892
Fixed many typos in comments and docstrings.
...
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Anubhav Joshi
bb2ca9fe6c
Fixed #22172 -- Allowed index_together to be a single list (rather than list of lists)..
...
Thanks EmilStenstrom for the suggestion.
2014-03-01 15:44:42 -05:00
Andrew Godwin
cbd04c7c49
Fix keyword agument names in RunPython to be positional
2014-02-28 09:22:48 -08:00
Andrew Gorcester
202bf69c2f
Fixed #22095 -- Enabled backward migrations for RunPython operations
...
Added reversible property to RunPython so that migrations will not
refuse to reverse migrations including RunPython operations, so long as
reverse_code is set in the RunPython constructor. Included tests to
check the reversible property on RunPython and the similar RunSQL.
2014-02-23 09:30:02 +01:00
Andrew Godwin
3c547a423f
Merge pull request #2270 from bmispelon/ticket-22030
...
Fixed #22030 -- Don't assume that all fields have a swappable_setting at...
2014-02-17 01:16:49 +00:00
Anton Baklanov
0bd92d68ad
Fixed #22035 -- reordered migration operations
...
Now AddField actions appear in operations list before AlterUniqueTogether
actions.
Thanks to SmileyChris for the report.
2014-02-14 20:00:39 -05:00
Baptiste Mispelon
6873eeeefb
Fixed #22030 -- Don't assume that all fields have a swappable_setting attribute.
2014-02-13 17:43:21 +01:00
Andrew Godwin
bad9456b9c
Fix my slightly hasty autodetector changes
2014-02-12 17:22:50 +00:00
Andrew Godwin
80bbe2265d
Remove redunant code from RunPython operation
2014-02-12 17:21:25 +00:00
Andrew Godwin
935e6c1dfc
Fixed #21868 : Don't die when seeing py3 namespace packages for mig dirs
2014-02-09 14:03:41 +00:00
Andrew Godwin
11c021336c
Fixed #21958 : Handle dependencies for swappable models in AddField
2014-02-09 12:46:38 +00:00
Andrew Godwin
2085f53f56
Fixed #21968 : Bad detection of old-style apps to add initial migration
2014-02-09 11:42:10 +00:00
Andrew Godwin
97a8fd4682
Fixed #21954 : Raise nice error when serializing datetimes with timezones
2014-02-09 11:17:38 +00:00
Tim Graham
4f8e8a6ec2
Removed unused imports + other flake8 fixes.
2014-02-09 06:13:10 -05:00
Andrew Godwin
98dd8dd02e
Fixed #21892 : RunPython no longer accepts strings
2014-02-09 10:54:02 +00:00
Berker Peksag
5d263dee30
Fixed #21674 -- Deprecated the import_by_path() function in favor of import_string().
...
Thanks Aymeric Augustin for the suggestion and review.
2014-02-08 11:12:19 -05:00
Marc Tamlyn
aea9faa146
Fix pep8 violation in migration template.
2014-02-05 14:39:44 +00:00
Carl Meyer
88a2d39159
Fixed #21874 -- Require Django applications to have a filesystem path.
...
Wherever possible this filesystem path is derived automatically from the app
module's ``__path__`` and ``__file__`` attributes (this avoids any
backwards-compatibility problems).
AppConfig allows specifying an app's filesystem location explicitly, which
overrides all autodetection based on ``__path__`` and ``__file__``. This
permits Django to support any type of module as an app (namespace packages,
fake modules, modules loaded by other hypothetical non-filesystem module
loaders), as long as the app is configured with an explicit filesystem path.
Thanks Aymeric for review and discussion.
2014-01-27 15:34:22 -07:00
Andrew Godwin
6758a9c0fc
Fixed #21872 : Not detecting dependencies from M2M fields
2014-01-27 11:49:55 +00:00
Aymeric Augustin
f901b4d6c8
Took advantage of the new get_model API. Refs #21702 .
2014-01-26 13:08:05 +01:00
Andrew Godwin
4b3b25104d
Fix soft-apply detection of migrations with dependencies
2014-01-24 12:26:38 +00:00
Markus Holtermann
047394f79c
Fixed #21852 -- Make migration writer serialize iterators
2014-01-22 09:21:54 +01:00
Andrew Godwin
6bbb820014
Fixed #21290 : Documented migration serializing and improved error
2014-01-19 19:27:30 +00:00
Andrew Godwin
3f1a008266
Fixed #21664 : Multi-table inheritance was duplicating _ptr fields
2014-01-19 18:35:49 +00:00
Andrew Godwin
1f5268a01f
Fixed #21786 : Bad behaviour when mixins + abstract bases for migrations
2014-01-19 18:09:52 +00:00
Andrew Godwin
af4a8478e4
Fixed #21783 : (again) Found second source of bug, also squashed it.
2014-01-19 17:43:31 +00:00
Andrew Godwin
e8d4aed3b9
Merge pull request #1681 from loic/migrations.format
...
Fixed #21323 -- Improved readability of serialized Operation.
2014-01-19 09:30:27 -08:00
Loic Bistuer
374faa4721
Fixed #21323 -- Improved readability of serialized Operation.
2014-01-20 00:16:07 +07:00
Andrew Godwin
1ea96acaf5
Fix unicode default input on py3
2014-01-19 17:14:31 +00:00
Andrew Godwin
c9de1b4a55
Implement swappable model support for migrations
2014-01-19 16:43:12 +00:00
Andrew Godwin
7535e9f4a4
Fixed #21784 : Correctly decode stdin input for migration defaults
2014-01-16 19:04:10 +00:00
Andrew Godwin
64887c644a
Fixed #21142 : Dependency failures on unmigrated apps.
2014-01-08 13:00:12 +00:00