DROP TABLE IF EXISTS `f2s_hosts`; CREATE TABLE `f2s_hosts` ( `id` int NOT NULL AUTO_INCREMENT, `ip` varchar(40) NOT NULL UNIQUE, `longitude` varchar(20) DEFAULT NULL, `latitude` varchar(20) DEFAULT NULL, `country_code` varchar(5) DEFAULT NULL, `country` varchar(60) DEFAULT NULL, `geo` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ); DROP TABLE IF EXISTS `f2s_bans`; CREATE TABLE `f2s_bans` ( `banid` int NOT NULL AUTO_INCREMENT, `id` int NOT NULL, `time` timestamp DEFAULT CURRENT_TIMESTAMP, `name` text NOT NULL, `protocol` varchar(10), `port` int(11) NOT NULL, PRIMARY KEY (`banid`), FOREIGN KEY (`id`) references `f2s_hosts`(`id`) ON DELETE CASCADE );