Commit 11f2c813 authored by Leigh Stoller's avatar Leigh Stoller

DB Updates for adding RF ranges to reservation groups.

parent c4feb5c5
......@@ -676,6 +676,27 @@ CREATE TABLE `apt_profiles` (
UNIQUE KEY `pidname` (`pid_idx`,`name`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `apt_reservation_groups`
--
DROP TABLE IF EXISTS `apt_reservation_groups`;
CREATE TABLE `apt_reservation_groups` (
`uuid` varchar(40) NOT NULL default '',
`pid` varchar(48) NOT NULL default '',
`pid_idx` mediumint(8) unsigned NOT NULL default '0',
`creator_uid` varchar(8) NOT NULL default '',
`creator_idx` mediumint(8) unsigned NOT NULL default '0',
`start` datetime DEFAULT NULL,
`end` datetime DEFAULT NULL,
`created` datetime DEFAULT NULL,
`deleted` datetime DEFAULT NULL,
`locked` datetime DEFAULT NULL,
`locker_pid` int(11) default '0',
`reason` mediumtext,
PRIMARY KEY (`uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `apt_reservation_group_reservations`
--
......@@ -698,27 +719,20 @@ CREATE TABLE `apt_reservation_group_reservations` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `apt_reservation_groups`
-- Table structure for table `apt_reservation_group_rf_reservations`
--
DROP TABLE IF EXISTS `apt_reservation_groups`;
CREATE TABLE `apt_reservation_groups` (
DROP TABLE IF EXISTS `apt_reservation_group_rf_reservations`;
CREATE TABLE `apt_reservation_group_rf_reservations` (
`uuid` varchar(40) NOT NULL default '',
`pid` varchar(48) NOT NULL default '',
`pid_idx` mediumint(8) unsigned NOT NULL default '0',
`creator_uid` varchar(8) NOT NULL default '',
`creator_idx` mediumint(8) unsigned NOT NULL default '0',
`start` datetime DEFAULT NULL,
`end` datetime DEFAULT NULL,
`created` datetime DEFAULT NULL,
`deleted` datetime DEFAULT NULL,
`locked` datetime DEFAULT NULL,
`locker_pid` int(11) default '0',
`reason` mediumtext,
PRIMARY KEY (`uuid`)
`freq_uuid` varchar(40) NOT NULL default '',
`freq_low` float NOT NULL DEFAULT '0',
`freq_high` float NOT NULL DEFAULT '0',
`submitted` datetime DEFAULT NULL,
`approved` datetime DEFAULT NULL,
PRIMARY KEY (`uuid`,`freq_uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `apt_reservation_history_actions`
--
......
......@@ -22,6 +22,17 @@ sub DoUpdate($$$)
" PRIMARY KEY (`uuid`,`aggregate_urn`,`type`) ".
" ) ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
if (!DBTableExists("apt_reservation_group_rf_reservations")) {
DBQueryFatal("CREATE TABLE `apt_reservation_group_rf_reservations` (".
" `uuid` varchar(40) NOT NULL default '', ".
" `freq_uuid` varchar(40) NOT NULL default '', ".
" `freq_low` float NOT NULL DEFAULT '0', ".
" `freq_high` float NOT NULL DEFAULT '0', ".
" `submitted` datetime DEFAULT NULL, ".
" `approved` datetime DEFAULT NULL, ".
" PRIMARY KEY (`uuid`,`freq_uuid`) ".
" ) ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
if (!DBTableExists("apt_reservation_groups")) {
DBQueryFatal("CREATE TABLE `apt_reservation_groups` (".
" `uuid` varchar(40) NOT NULL default '', ".
......
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