Commit 585bc385 authored by Gary Wong's avatar Gary Wong

Add DB update to support TCP port proxying.

parent 5a3e106a
......@@ -3764,6 +3764,20 @@ CREATE TABLE `table_regex` (
UNIQUE KEY `table_name` (`table_name`,`column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `tcp_proxy`
--
DROP TABLE IF EXISTS tcp_proxy;
CREATE TABLE tcp_proxy (
node_id varchar(32) NOT NULL,
node_ip varchar(15) NOT NULL,
node_port int(5) NOT NULL,
proxy_port int(5) NOT NULL,
PRIMARY KEY (node_id,node_ip,node_port),
UNIQUE KEY proxy_port (proxy_port)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `template_stamps`
--
......
#
# Add tcp_proxy table (used for SSH proxying to preserve public IP address
# space).
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBTableExists("tcp_proxy")) {
DBQueryFatal("CREATE TABLE `tcp_proxy` ( ".
" `node_id` varchar(32) NOT NULL, " .
" `node_ip` varchar(15) NOT NULL, " .
" `node_port` int(5) NOT NULL, " .
" `proxy_port` int(5) NOT NULL, " .
" PRIMARY KEY (`node_id`,`node_ip`,`node_port`), " .
" UNIQUE KEY `proxy_port` (`proxy_port`) " .
") ENGINE=MyISAM DEFAULT CHARSET=latin1" );
}
return 0;
}
1;
# 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