Commit 9dd61e7e authored by Gary Wong's avatar Gary Wong

Add future_reservations database table (to implement admission control).

parent 3d3de707
......@@ -1878,6 +1878,26 @@ CREATE TABLE `fs_resources` (
KEY `fileidx` (`fileidx`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `future_reservations`
--
DROP TABLE IF EXISTS `future_reservations`;
CREATE TABLE `future_reservations` (
`pid` varchar(48) NOT NULL DEFAULT '',
`pid_idx` mediumint(8) unsigned NOT NULL DEFAULT '0',
`nodes` smallint(5) unsigned NOT NULL DEFAULT '0',
`type` varchar(30) NOT NULL DEFAULT '',
`start` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`end` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`uid` varchar(8) NOT NULL DEFAULT '',
`uid_idx` mediumint(8) unsigned NOT NULL DEFAULT '0',
`notes` mediumtext,
`admin_notes` mediumtext,
PRIMARY KEY (`pid_idx`,`start`,`end`,`type`,`nodes`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `global_ipalloc`
--
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBTableExists("future_reservations")) {
DBQueryFatal( "CREATE TABLE `future_reservations` ( ".
" `pid` varchar(48) NOT NULL default '', " .
" `pid_idx` mediumint(8) unsigned NOT NULL default '0', " .
" `nodes` smallint(5) unsigned NOT NULL default '0', " .
" `type` varchar(30) NOT NULL default '', " .
" `start` datetime, " .
" `end` datetime, " .
" `uid` varchar(8) NOT NULL default '', " .
" `uid_idx` mediumint(8) unsigned NOT NULL default '0', " .
" `notes` mediumtext, " .
" `admin_notes` mediumtext, " .
" PRIMARY KEY( `pid_idx`, `start`, `end`, `type`, `nodes`, `uid_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