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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -