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:
add new field existing class, , make sure db entry allocated it?
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
Post a Comment