0

Till v1.8, I used to issue following command and it used to create tables for me and ask for creating a new user.

python manage.py syncdb

Now since this command has been removed in 1.9, how do I do it?

Sudhanshu Mishra
  • 2,024
  • 1
  • 22
  • 40

2 Answers2

2

From Django documentation

This command has been deprecated in favor of the migrate command, which performs both the old behavior as well as executing migrations.

For older software you may want to use

python manage.py migrate --run-syncdb
sanmai
  • 29,083
  • 12
  • 64
  • 76
zanderle
  • 815
  • 5
  • 15
1

You should use Django migrations.

First usage :

python manage.py makemigrations
python manage.py migrate

Then

python manage.py makemigrations your_app
python manage.py migrate

It replace South in Django 1.7. If your want more details : https://docs.djangoproject.com/en/1.9/topics/migrations/

Samuel Dauzon
  • 10,744
  • 13
  • 61
  • 94