0

When i run following command:- python manage.py sql

i get an error stating that

Unknown command: 'sql' Type 'manage.py help' for usage.

version :- python manage.py --version 1.10

2 Answers 2

1

First do a make migrations

python manage.py makemigrations app_name

Apply migrations

python manage.py migrate

Instead of using python manage.py sql app_name

Sign up to request clarification or add additional context in comments.

1 Comment

latest django doesn't support one liner command instead needs two lines first create migration and then dump migrate to db.
0

That is working. There is no 'sql' command. We're you thinking of 'sqlmigrate' maybe? https://docs.djangoproject.com/en/1.10/ref/django-admin/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.