[jifty-devel] column changes in schema update
yichun.zhang at alibaba-inc.com
Sun Feb 3 05:59:29 EST 2008
On Feb 1, 2008 12:54 AM, Jesse Vincent <jesse at bestpractical.com> wrote:
> > I couldn't find any easy way to add 'is indexed' property to a column that is
> > already in the database. If I increase the version in "since" for that column,
> > Jifty tries to create a new column without checking if it exists already.
> > I suppose the same problem occurs if I need to change the column type, say,
> > from varchar(50) to varchar(100).
> > I think the right way would be to check if the column exists and try to
> > alter it, but it might be tricky to figure out what exactly has to be altered.
> So, that's precisely what we're trying to do in the (somewhat unloved)
> versionless upgrades branch. It needs a lot of tests to be something I'd
> want to core :/
We've been thinking (hard) about this for our Yahoo! 4E OpenAPI
project as well. Meta-model upgrading there is currently very painful
without sql hacks :)
Hopefully I can learn something clever from Jifty (again) ;)
More information about the jifty-devel