Oleg Broytmann wrote: > On Thu, Feb 19, 2009 at 12:25:43PM +0100, Christian Widmer wrote: > >> "sqlobject-admin upgrade -h" says: >> This command runs scripts (that you write by hand) to upgrade a database.... >> >> Does this mean, that I end up having to manually update the table >> definition AND the class definition each time? >> > > Well, in any case you have to manually update table definitions. But you > can use a different approach - SQLObject can draw table definitions from > the DB iteslf; of course in this case you have to manually alter tables. > > >> Is there no way to create >> a "diff" between the class defined in python and the current database >> scheme automatically? >> > > I think "sqlobject-admin status" and "sqlobject-admin record" may help. > Thanks for your quick reply, Oleg. I looked at sqlobject-admin status and record, and in deed "status" recognizes that the python class definition and the table are out-of-sync. It would be nice, however to have something like ClassName.upgrade() similar to ClassName.create(), that takes into account differences and performs the appropriate ALTER operation.
cheers, Chris ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss