This is a newbie theory question - I'm just starting to use Python and looking into Django and orm. Question: If I develop my objects and through additional development modify the base object structures, inheritance, etc. - would Django's ORM solution modify the database automatically OR do I need to perform a conversion (if the app is live)?
So, I start with a basic Phone app Object person: name, address, city, state, zip, phone and I change to Object person: title, name, address, city, state, zip, phone object Object phone: type, phone #
Do I manually convert via the db and change the code OR does the ORM middleware make the change? and if so - how?
As of Django 1.02 (and as of the latest run-up to 1.1 in subversion), there is no automatic "schema migration". Your choices are to drop the schema and have Django recreate it (via manage.py syncdb), or alter the schema by hand yourself.
There are some tools on the horizon for Django schema migration. (I'm watching South.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With