summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2013-11-26 12:33:52 -0800
committerAndrew Godwin <andrew@aeracode.org>2013-11-26 12:33:52 -0800
commit0c46ca83e820cd725f5d0fa299c2b5405bfeee1b (patch)
tree6a151a22fa9f56fd9dbc9fc172079bdaa359f4af /docs/topics
parentac17525039b127e8712c402d0b09ffa864c37ef5 (diff)
parent455e2896b122a331057483634bea9c8074bdc97d (diff)
Merge pull request #1985 from raphaa/21499
Fixed #21499 -- Migrations won't work if field signature changes
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/migrations.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt
index 4eb9b4377d..048daaab37 100644
--- a/docs/topics/migrations.txt
+++ b/docs/topics/migrations.txt
@@ -244,6 +244,15 @@ it's entirely possible to write them manually if you need to. Some of the
more complex operations are not autodetectable and are only available via
a hand-written migration, so don't be scared about editing them if you have to.
+Custom fields
+~~~~~~~~~~~~~
+
+You can't modify the number of positional arguments in an already migrated
+custom field without raising a TypeError. The old migration will call the
+modified ``__init__`` method with the old signature. So if you need a new
+argument, please create a keyword argument and use e.g.
+``assert kwargs.get('argument_name') is not None`` in the constructor.
+
Adding migrations to apps
-------------------------