Commit c3944415 authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Fix the blasted mysql. Grumble. Whitespace. Mumble.

parent 00aead27
......@@ -5104,18 +5104,18 @@ CREATE TABLE `virt_node_public_addr` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `virt_address_pool`
-- Table structure for table `virt_address_allocation`
--
DROP TABLE IF EXISTS `virt_address_allocation`;
CREATE TABLE `virt_address_allocation` (
`idx` int(10) unsigned NOT NULL default `0`,
`pool_id` varchar(32) NOT NULL default '0',
`idx` int(10) unsigned NOT NULL default '0',
`pool_id` varchar(32) NOT NULL default '',
`pid` varchar(48) NOT NULL default '',
`eid` varchar(32) NOT NULL default '',
`count` int(10) NOT NULL default 0,
`restriction` enum('continguous', 'cidr', 'any') NOT NULL default 'any',
`version` enum('ipv4', 'ipv6') NOT NULL default 'ipv4',
`count` int(10) NOT NULL default '0',
`restriction` enum('contiguous','cidr','any') NOT NULL default 'any',
`version` enum('ipv4','ipv6') NOT NULL default 'ipv4',
PRIMARY KEY (`idx`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......
......@@ -10,20 +10,26 @@ sub DoUpdate($$$)
if (!DBSlotExists("virt_node_public_addr", "pool_id")) {
DBQueryFatal("alter table virt_node_public_addr add ".
" `pool_id` varchar(32) default NULL, ".
" `pid` varchar(48) default NULL, ".
" `eid` varchar(32) default NULL, ".
" after port");
" `pool_id` varchar(32) default NULL ".
" after `port`");
DBQueryFatal("alter table virt_node_public_addr add ".
" `pid` varchar(48) default NULL ".
" after `pool_id`");
DBQueryFatal("alter table virt_node_public_addr add ".
" `eid` varchar(32) default NULL ".
" after `pid`");
}
if (!DBTableExists("virt_address_allocation")) {
DBQueryFatal("create table `virt_address_allocation` ( ".
" `idx` int(10) unsigned NOT NULL default `0`, ".
" `pool_id` varchar(32) NOT NULL default '0', ".
" `idx` int(10) unsigned NOT NULL default 0, ".
" `pool_id` varchar(32) NOT NULL default '', ".
" `pid` varchar(48) NOT NULL default '', ".
" `eid` varchar(32) NOT NULL default '', ".
" `count` int(10) NOT NULL default 0, ".
" `restriction` enum('continguous', 'cidr', 'any') NOT NULL default 'any', ".
" `restriction` enum('contiguous', 'cidr', 'any') NOT NULL default 'any', ".
" `version` enum('ipv4', 'ipv6') NOT NULL default 'ipv4', ".
" PRIMARY KEY (`idx`) ".
" ) ENGINE=MyISAM DEFAULT CHARSET=latin1")
" ) ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
return 0;
}
......
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