forked from opennetadmin/ona
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1-to-2.sql
25 lines (20 loc) · 1.18 KB
/
1-to-2.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-- This is to upgrade the database info to version 08.05.14
DROP TABLE IF EXISTS `locations`;
CREATE TABLE `locations` (
`id` int(10) unsigned NOT NULL,
`reference` varchar(10) NOT NULL,
`name` varchar(63) NOT NULL,
`address` varchar(63) NOT NULL,
`city` varchar(63) NOT NULL,
`state` varchar(31) NOT NULL,
`zip_code` int(5) unsigned NOT NULL,
`latitude` varchar(20) NOT NULL,
`longitude` varchar(20) NOT NULL,
`misc` varchar(191) NOT NULL COMMENT 'Misc info, site contacts, phone numbers etc.',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This table needs re-worked';
INSERT INTO `dcm_module_list` VALUES (56, 'config_diff', 'Display unix diff of configs', 'ona/configuration.inc.php');
INSERT INTO `dcm_module_list` VALUES (57, 'nat_add', 'Add external NAT IP to existing internal IP', 'ona/interface.inc.php');
INSERT INTO `dcm_module_list` VALUES (58, 'nat_del', 'Delete external NAT IP from existing internal IP', 'ona/interface.inc.php');
ALTER TABLE `interfaces` ADD `nat_interface_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'ID of external interface that this interface is NATed to' AFTER `host_id` ;
UPDATE `devices` SET `location_id` = 0;