Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1985 from raphaa/21499

Fixed #21499 -- Migrations won't work if field signature changes
  • Loading branch information...
commit 0c46ca83e820cd725f5d0fa299c2b5405bfeee1b 2 parents ac17525 + 455e289
@andrewgodwin andrewgodwin authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 docs/topics/migrations.txt
View
9 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
-------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.