[jifty-devel] column changes in schema update
jesse at bestpractical.com
Thu Jan 31 11:54:14 EST 2008
On Thu, Jan 31, 2008 at 05:53:17AM -0800, Stanislav Sinyagin 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 :/
More information about the jifty-devel