1

I'm trying to Create initial migrations for existing schema in Django 1.7 and I'm following this solution from the above question.

But When I run

python manage.py migrate --fake-initial

I get this error:

Usage: manage.py migrate [options] [app_label] [migration_name]

Updates database schema. Manages both apps with migrations and those without.

manage.py: error: no such option: --fake-initial

Considering that the question and answer are for Django 1.8, is it different how to do this in 1.7 version?

Community
  • 1
  • 1
Ghasem
  • 14,455
  • 21
  • 138
  • 171

2 Answers2

3

The --fake-initial flag to migrate was added in Django 1.8. Previously, Django would always automatically fake-apply initial migrations if it detected that the tables exist.

See here in the docs: https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-option---fake-initial

garnertb
  • 9,454
  • 36
  • 38
0

You're using Django 1.7 and that option was added in 1.8.

Two-Bit Alchemist
  • 17,966
  • 6
  • 47
  • 82