django - How to get my database to reflect changes made to models.py? -
i made alter models, , cannot life of me figure out how database reflect models. far have tried following:
python manage.py shelldb select * sqlite_master type='table'; drop table appname_modelname;
when tried got: "unknown command: shelldb".
i tried:
python manage.py dbshell drop table accounts_userreview;
no error, db still doesn't reflect models.
finally, altogether deleted database dragging trash , doing syncdb, made me create new superuser, still database created not reflect changes models.
i'm @ loss here, else can here? also, i'm new learning django, there kind of layer in between models , database? assume there since deleting , rebuilding database didn't work.
would appreciate advice here.
if on django < 1.7 , have utilize migration tool i.e. - south . django 1.7 has inbuilt migration.
for more info migrations
django django-models
No comments:
Post a Comment