From 455e2896b122a331057483634bea9c8074bdc97d Mon Sep 17 00:00:00 2001 From: Raphael Jasjukaitis Date: Sun, 24 Nov 2013 15:26:45 +0100 Subject: [PATCH] Fixed #21499 -- Added a paragraph to the docs. --- docs/topics/migrations.txt | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -------------------------