· 9 years ago · Oct 12, 2016, 06:30 PM
1DROP TABLE IF EXISTS location;
2
3CREATE TABLE IF NOT EXISTS `location` (
4 `locId` int(11) unsigned NOT NULL AUTO_INCREMENT,
5 `country` varchar(2) DEFAULT NULL,
6 `region` varchar(2) DEFAULT NULL,
7 `city` varchar(1000) DEFAULT NULL,
8 `postalCode` varchar(10) DEFAULT NULL,
9 `latitude` float DEFAULT NULL,
10 `longitude` float DEFAULT NULL,
11 `metroCode` int(11) DEFAULT NULL,
12 `areaCode` int(11) DEFAULT NULL,
13 PRIMARY KEY (`locId`),
14 KEY `city` (`city`(767))
15) ENGINE=InnoDB DEFAULT CHARSET=latin1;
16
17DROP TABLE IF EXISTS blocks;
18
19CREATE TABLE `blocks` (
20 `startIpNum` int(11) unsigned NOT NULL AUTO_INCREMENT,
21 `endIpNum` int(11) DEFAULT NULL,
22 `locId` int(11) DEFAULT NULL,
23 PRIMARY KEY (`startIpNum`)
24) ENGINE=InnoDB AUTO_INCREMENT=3758096129 DEFAULT CHARSET=latin1;