Commit e6ad7a12 authored by Leigh B Stoller's avatar Leigh B Stoller

Add new tables for managing image tracking, one to handle pending

notifications to an image's origin cluster, another for the origin cluster
to record images that need to be imported from a remote cluster after
notification.
parent 66057123
......@@ -2042,6 +2042,18 @@ CREATE TABLE `image_history` (
KEY `imagestamp` (`imageid`,`stamp`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `image_notifications`
--
DROP TABLE IF EXISTS `image_notifications`;
CREATE TABLE `image_notifications` (
`imageid` int(8) unsigned NOT NULL default '0',
`version` int(8) unsigned NOT NULL default '0',
`origin_uuid` varchar(64) default NULL,
PRIMARY KEY (`imageid`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `image_permissions`
--
......@@ -2144,6 +2156,17 @@ CREATE TABLE `image_versions` (
FULLTEXT KEY `imagesearch` (`imagename`,`description`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `image_updates`
--
DROP TABLE IF EXISTS `image_updates`;
CREATE TABLE `image_updates` (
`imageid` int(8) unsigned NOT NULL default '0',
`url` varchar(255) NOT NULL default '',
PRIMARY KEY (`imageid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `images`
--
......
#
# Image import and IMS stuff.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBTableExists("image_notifications")) {
DBQueryFatal("CREATE TABLE `image_notifications` ( ".
" `imageid` int(8) unsigned NOT NULL default '0', ".
" `version` int(8) unsigned NOT NULL default '0', ".
" `origin_uuid` varchar(64) default NULL, ".
" PRIMARY KEY (`imageid`,`version`) ".
") ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
if (!DBTableExists("image_updates")) {
DBQueryFatal("CREATE TABLE `image_updates` ( ".
" `imageid` int(8) unsigned NOT NULL default '0', ".
" `url` varchar(255) NOT NULL default '', ".
" PRIMARY KEY (`imageid`) ".
") ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
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