Manage.py Database Command

rusli
Site Admin
文章: 212
註冊時間: 週三 7月 07, 2010 9:49 pm

Manage.py Database Command

文章rusli » 週六 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 )

回到「Django」

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 0 位訪客