python - Adding Columns to Existing Schema -
i getting started django (1.8) , bit confused how modify models.
if go in , add new field existing model, start getting "no such column" error. far, i've been wiping db , starting over, gets annoying, there process this?
what happens when go production? how modify schema @ point? resources see online south, guess built version of django, still can't find solid info.
thanks
in django 1.7+ there no need of south
.only
python manage.py makemigrations python manage.py migrate
if you're changing on existing app made in django 1.7-, need 1 pre-step (as found out) listed in documentation:
python manage.py makemigrations your_app_label
also try this
class mymodel(models.model): myfiled = models.charfield() # ... class meta: managed = true
Comments
Post a Comment