Adding fields to an already existing database for Django (version < 1.7) -


i'm using django ( < v1.7), sqlite3 database engine.

i trying add new field existing model's class. class has data associated it.

manage.py syncdb not adding new fields db.

is there way to:

  1. add new field existing class, , make sure db entry allocated it?

  2. populate new field empty string existing db entries?

install south in django , can handle existing tables. check this

if want use django-south, install on django, after adding new fields existing model run

python manage.py schemamigration --initial

it create file in project app. then,

python manage.py migrate

thats table altered.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -