Commit 68580e03 authored by Gary Wong's avatar Gary Wong

Add a reservation_history table, for archiving past reservations.

parent 9075e458
......@@ -4298,6 +4298,23 @@ CREATE TABLE `reposition_status` (
PRIMARY KEY (`node_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `reservation_history`
--
DROP TABLE IF EXISTS `reservation_history`;
CREATE TABLE `reservation_history` (
`pid` varchar(48) NOT NULL DEFAULT '',
`nodes` smallint(5) NOT NULL DEFAULT '0',
`type` varchar(30) NOT NULL DEFAULT '',
`start` datetime DEFAULT NULL,
`end` datetime DEFAULT NULL,
`uid` varchar(8) NOT NULL DEFAULT '',
`notes` mediumtext,
`admin_notes` mediumtext,
KEY `start` (`start`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `reservation_version`
--
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBTableExists("reservation_history")) {
DBQueryFatal("CREATE TABLE `reservation_history` ( ".
" `pid` varchar(48) NOT NULL default '', " .
" `nodes` smallint(5) NOT NULL default '0', " .
" `type` varchar(30) NOT NULL default '', " .
" `start` datetime, " .
" `end` datetime, " .
" `uid` varchar(8) NOT NULL default '', " .
" `notes` mediumtext, " .
" `admin_notes` mediumtext, " .
" KEY `start` (`start`) " .
") 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