convertinganapp.rst 1.0 KB

12345678910111213141516171819202122232425262728
  1. .. _converting-an-app:
  2. Converting An App
  3. =================
  4. Converting an app to use South is very easy:
  5. - Edit your settings.py and put 'south' into `INSTALLED_APPS`
  6. (assuming you've installed it to the right place)
  7. - Run ``./manage.py syncdb`` to load the South table into the database.
  8. Note that syncdb looks different now - South modifies it.
  9. - Run ``./manage.py convert_to_south myapp`` - South will automatically make and
  10. pretend to apply your first migration.
  11. Converting other installations and servers
  12. ------------------------------------------
  13. The convert_to_south command only works entirely on the first machine you run it
  14. on. Once you've committed the initial migrations it made into the database,
  15. you'll have to run ``./manage.py migrate myapp 0001 --fake`` on every machine that
  16. has a copy of the codebase (make sure they were up-to-date with models and
  17. schema first).
  18. Remember that new installations of the codebase after this don't need these
  19. steps; you need only do a syncdb then a normal migrate.