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
- ``--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
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 ``./manage.py 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.