Commit 1fdf5323 authored by Leigh B Stoller's avatar Leigh B Stoller

Changed my mind about how I want to do this.

parent 0c638b51
......@@ -2183,6 +2183,8 @@ CREATE TABLE `image_versions` (
DROP TABLE IF EXISTS `image_updates`;
CREATE TABLE `image_updates` (
`imageid` int(8) unsigned NOT NULL default '0',
`updater` varchar(8) default NULL,
`updater_idx` mediumint(8) unsigned NOT NULL default '0',
`updater_urn` varchar(128) default NULL,
`url` varchar(255) NOT NULL default '',
PRIMARY KEY (`imageid`)
......
......@@ -5,9 +5,21 @@ sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("image_updates", "updater")) {
DBQueryFatal("ALTER TABLE image_updates ADD ".
" `updater` varchar(8) default NULL ".
" AFTER imageid");
}
if (!DBSlotExists("image_updates", "updater_idx")) {
DBQueryFatal("ALTER TABLE image_updates ADD ".
" `updater_idx` mediumint(8) unsigned NOT NULL ".
" default '0'".
" AFTER updater");
}
if (!DBSlotExists("image_updates", "updater_urn")) {
DBQueryFatal("ALTER TABLE image_updates ADD ".
" `updater_urn` varchar(128) default NULL AFTER imageid");
" `updater_urn` varchar(128) default NULL ".
" AFTER updater_idx");
}
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment