Unknown command: 'syncdb' Visual Studio 2013

1

I'm having a hard time developing a system in Django. When I try to sync the database, this error appears:

Python interactive window. Type $help for a list of commands.
Executing manage.py syncdb
Unknown command: 'syncdb'
Type 'manage.py help' for usage.
The Python REPL process has exited

    
asked by anonymous 13.12.2015 / 20:28

2 answers

2

If you are using django 1.9, syncdb has been removed, see the release:

link

To run the migrations, you should use makemigrations and migrate.

Created or changed table:

python manage.py makemigrations
#Irá criar arquivos de migrações com as coisas que você fez

Run migrations:

python manage.py migrate
#Irá aplicar as alterações no banco.
    
13.12.2015 / 22:39
0

Alex, Dias is correct. The syncdb command has been discontinued. Instead I use the 2 commands below and exactly in this sequence so as not to have problems with the Django Admin DB:

python manage.py migrate auth python manage.py migrate --run-syncdb

    
09.01.2016 / 12:36