[SQLObject] Re: Changing table structure via SQLOBject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Chris G. <ch...@il...> - 2004-03-07 05:31:40
|
Hey, that reminds me... you know what I think would be cool? Well, probably not, so I'll tell you! A function that you can run after you've modified the attributes of an SQLObject which will update the database's table to add the new attributes and changes WITHOUT requiring you to lose all of your data (or to have to change the table by hand)! It would only work if you've made changes that aren't impossible to convert (i.e. changing a StringCol() to an IntCol()). I think it would be handy. :) Is there a clever way of implementing this, or is it basically just a whole load of if statements....? (i.e. is there a facility in MySQL or PostgreSQL which lets you submit a new schema and IT figures out if it's possible to convert the table to that?) "David McNab" <da...@re...> wrote in message news:404...@re...... > Found it in the manual under 'Runtime Column Changes'. > > Sorry for the mailbox noise. > > David McNab wrote: > > Hi, > > > > Is there any way to change the structure of a table via SQLObject? Or do > > I need to fire off a raw query? > > > > I'm particularly interested in being able to add ForeignKey()s, > > MultipleJoin()s etc. > > > > -- > > Kind regards > David > > -- > > leave this line intact so your email gets through my junk mail filter > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click |