Commit 9b125c55 authored by Leigh B Stoller's avatar Leigh B Stoller

New table to store apt extension requests/denials explicitly instead of as

a adhoc text blob.
parent 8fd0771c
......@@ -148,6 +148,27 @@ CREATE TABLE `apt_instance_aggregates` (
PRIMARY KEY (`uuid`,`aggregate_urn`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `apt_instance_extension_info`
--
DROP TABLE IF EXISTS `apt_instance_extension_info`;
CREATE TABLE `apt_instance_extension_info` (
`uuid` varchar(40) NOT NULL default '',
`idx` int(10) unsigned NOT NULL auto_increment,
`name` varchar(16) NOT NULL default '',
`tstamp` datetime default NULL,
`uid` varchar(8) NOT NULL default '',
`uid_idx` mediumint(8) unsigned NOT NULL default '0',
`action` enum('request','deny') NOT NULL default 'request',
`wanted` smallint(5) unsigned NOT NULL default '0',
`granted` smallint(5) unsigned default NULL,
`admin` tinyint(1) NOT NULL default '0',
`reason` mediumtext,
`message` mediumtext,
PRIMARY KEY (`uuid`,`idx`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `apt_instance_failures`
--
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBTableExists("apt_instance_extension_info")) {
DBQueryFatal("CREATE TABLE `apt_instance_extension_info` ( ".
" `uuid` varchar(40) NOT NULL default '', ".
" `idx` int(10) unsigned NOT NULL auto_increment, ".
" `name` varchar(16) NOT NULL default '', ".
" `tstamp` datetime default NULL, ".
" `uid` varchar(8) NOT NULL default '', ".
" `uid_idx` mediumint(8) unsigned NOT NULL default '0', ".
" `action` enum('request','deny') ".
" NOT NULL default 'request', ".
" `wanted` smallint(5) unsigned NOT NULL default '0', ".
" `granted` smallint(5) unsigned default NULL, ".
" `admin` tinyint(1) NOT NULL default '0', ".
" `reason` mediumtext, ".
" `message` mediumtext, ".
" PRIMARY KEY (`uuid`,`idx`) ".
") ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
return 0;
}
# 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