USE `aws_logs`;
CREATE TABLE `location_data` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `ip_address` varchar(50) NOT NULL DEFAULT '',
  `hostname` varchar(200) DEFAULT NULL,
  `loc` varchar(100) DEFAULT NULL,
  `org` varchar(200) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `region` varchar(100) DEFAULT NULL,
  `country` varchar(2) DEFAULT NULL,
  `phone` varchar(5) DEFAULT NULL,
  `postal` varchar(20) DEFAULT NULL,
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `IPKey` (`ip_address`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
