Commits

Andrew Godwin committed 62819d3

Fleshing out the autodetector docs.

  • Participants
  • Parent commits 4a78852

Comments (0)

Files changed (1)

File docs/autodetector.rst

 Consider moving your hook code into its own data migration, or use one of
 our own :ref:`signals`.
 
+
 Field addition and removal
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 tutorial.
 
 
+Field changes
+^^^^^^^^^^^^^
 
+South will detect if you change a field, and can generally apply the changes,
+with a few exceptions:
+
+ - If you change the field to a ``ForeignKey``, or change the target model
+   of a ``ForeignKey``, South won't create a new constraint on your database
+   reflecting the change. This will be fixed in a future release; the interim 
+   effect is just that there's less error checking on your database.
+
+
+ManyToMany addition and removal
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ManyToMany fields are detected on addition and removal; when you add the field,
+South will create the table the ManyToMany represents, and when you remove the
+field, the table will be deleted.
+
+The one exception to this is when you have a 'through model' (i.e. you're using
+the ``through=`` option) - since the table for the model is already created when
+the model is detected, South does nothing with these types of ManyToMany fields.
+
+
+Unique changes
+^^^^^^^^^^^^^^
+
+If you change the ``unique=`` attribute on a field, or the ``unique_together``
+in a model's Meta, South will detect and change the constraints on the database
+accordingly (except on SQLite, where UNIQUE isn't supported, and just ignored.)
+
+
+