Manage.py Database Command
發表於 : 週六 8月 23, 2014 8:33 pm
python manage.py sql appname ==> prints CREATE TABLE SQL statements for the given app name
python manage.py syncdb ==> Creates the databse tables for all installed apps whose tables have not ready been created
syncdb does NOT do databse migration!
It will not alter tables
Migrations will be a part of Django 1.7
Changing a Model
Drop the table; run syncdb
Use south ( http://goo.gl/8n4qmA )
python manage.py syncdb ==> Creates the databse tables for all installed apps whose tables have not ready been created
syncdb does NOT do databse migration!
It will not alter tables
Migrations will be a part of Django 1.7
Changing a Model
Drop the table; run syncdb
Use south ( http://goo.gl/8n4qmA )