Luke Plant  committed af0a685

Docs for --autofake-first

  • Participants
  • Parent commits e5dec23

Comments (0)

Files changed (2)

File docs/commands.rst

    full upwards migration, if there are any.
  - ``--fake``: Records the migration sequence as having been applied, but
    doesn't actually run it. Useful for :ref:`converting-an-app`.
+ - ``--autofake-first``: Detects if tables exist for the app, and if
+   no migrations have yet been run the first migration is 'faked'
+   i.e. marked as having been applied without being run. Useful for
+   :ref:`converting-an-app`.
  - ``--db-dry-run``: Loads and runs the migration, but doesn't actually
    access the database (the SQL generated is thrown away at the last minute).
    The migration is also not recorded as being run; this is useful for

File docs/convertinganapp.rst

 Remember that new installations of the codebase after this don't need these
 steps; you need only do a syncdb then a normal migrate.
+If you need to run the migrate command so that it will work for either
+situation, you can use ``./ migrate --autofake-first``. For each app
+(or each app specified), this will fake the first migration if no migrations
+have yet been run for that app and if it detects that at least one table for the
+app has already been created.