Commit 8f839707 authored by Gary Wong's avatar Gary Wong
Browse files

Update reservations table (to handle reservation attributes support).

parent 3d7a36cc
......@@ -1922,20 +1922,20 @@ CREATE TABLE `fs_resources` (
DROP TABLE IF EXISTS `future_reservations`;
CREATE TABLE `future_reservations` (
`idx` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`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',
`start` datetime DEFAULT NULL,
`end` datetime DEFAULT NULL,
`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`)
PRIMARY KEY (`idx`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `global_ipalloc`
--
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
# Have to obliterate any old table since the primary key change
# breaks backward compatibility. Nobody's using this yet anyway.
DBQueryFatal( "DROP TABLE IF EXISTS future_reservations" );
DBQueryFatal( "CREATE TABLE `future_reservations` ( " .
" `idx` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, " .
" `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 DEFAULT NULL, " .
" `end` datetime DEFAULT NULL, " .
" `uid` varchar(8) NOT NULL DEFAULT '', " .
" `uid_idx` mediumint(8) unsigned NOT NULL DEFAULT '0', " .
" `notes` mediumtext, " .
" `admin_notes` mediumtext, " .
" PRIMARY KEY (`idx`) " .
") ENGINE=MyISAM DEFAULT CHARSET=latin1" );
return 0;
}
# Local Variables:
# mode:perl
# End:
Supports Markdown
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