diff --git a/chat_log.sql b/chat_log.sql new file mode 100644 index 000000000..f35f3e925 --- /dev/null +++ b/chat_log.sql @@ -0,0 +1,25 @@ +-- Adminer 4.8.1 MySQL 5.7.41 dump + +SET NAMES utf8; +SET time_zone = '+00:00'; +SET foreign_key_checks = 0; +SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; + +SET NAMES utf8mb4; + +DROP TABLE IF EXISTS `chat_log`; +CREATE TABLE `chat_log` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `date` datetime DEFAULT NULL, + `map` varchar(128) NOT NULL, + `steamid` varchar(21) NOT NULL, + `name` varchar(128) NOT NULL, + `message_style` tinyint(2) DEFAULT '0', + `message` varchar(126) NOT NULL, + `server` varchar(126) DEFAULT NULL, + `port` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +-- 2023-09-14 02:09:31 diff --git a/mysqlinit.sql b/l4d2stats.sql similarity index 63% rename from mysqlinit.sql rename to l4d2stats.sql index 44fba6fd8..54f6303d1 100644 --- a/mysqlinit.sql +++ b/l4d2stats.sql @@ -1,29 +1,9 @@ --- Adminer 4.8.1 MySQL 5.7.37 dump +-- Adminer 4.8.1 MySQL 5.7.41 dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; - -CREATE DATABASE `chat` /*!40100 DEFAULT CHARACTER SET utf8 */; -USE `chat`; - -SET NAMES utf8mb4; - -DROP TABLE IF EXISTS `chat_log`; -CREATE TABLE `chat_log` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `date` datetime DEFAULT NULL, - `map` varchar(128) NOT NULL, - `steamid` varchar(21) NOT NULL, - `name` varchar(128) NOT NULL, - `message_style` tinyint(2) DEFAULT '0', - `message` varchar(126) NOT NULL, - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -CREATE DATABASE `l4d2stats` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */; -USE `l4d2stats`; +SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP TABLE IF EXISTS `ip2country`; CREATE TABLE `ip2country` ( @@ -62,6 +42,8 @@ CREATE TABLE `ip2country_locations` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +SET NAMES utf8mb4; + DROP TABLE IF EXISTS `lilac_detections`; CREATE TABLE `lilac_detections` ( `name` varchar(128) CHARACTER SET utf8mb4 NOT NULL, @@ -333,278 +315,10 @@ CREATE TABLE `timedmaps` ( `sinum` int(1) unsigned NOT NULL DEFAULT '0', `sitime` int(1) unsigned NOT NULL DEFAULT '0', `usebuy` int(1) unsigned NOT NULL DEFAULT '0', + `auto` int(1) unsigned NOT NULL DEFAULT '0', `anneversion` varchar(64) CHARACTER SET utf8mb4 NOT NULL DEFAULT 'None', - PRIMARY KEY (`map`,`gamemode`,`difficulty`,`steamid`,`time`,`mutation`,`mode`,`sinum`,`sitime`,`usebuy`,`anneversion`) + PRIMARY KEY (`map`,`gamemode`,`difficulty`,`steamid`,`time`,`mutation`,`mode`,`sinum`,`sitime`,`usebuy`,`anneversion`,`auto`,`players`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE DATABASE `sourcebans` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */; -USE `sourcebans`; - -DROP TABLE IF EXISTS `sb_admins`; -CREATE TABLE `sb_admins` ( - `aid` int(6) NOT NULL AUTO_INCREMENT, - `user` varchar(64) NOT NULL, - `authid` varchar(64) NOT NULL DEFAULT '', - `password` varchar(128) NOT NULL, - `gid` int(6) NOT NULL, - `email` varchar(128) NOT NULL, - `validate` varchar(128) DEFAULT NULL, - `extraflags` int(10) NOT NULL, - `immunity` int(10) NOT NULL DEFAULT '0', - `srv_group` varchar(128) DEFAULT NULL, - `srv_flags` varchar(64) DEFAULT NULL, - `srv_password` varchar(128) DEFAULT NULL, - `lastvisit` int(11) DEFAULT NULL, - PRIMARY KEY (`aid`), - UNIQUE KEY `user` (`user`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_admins_servers_groups`; -CREATE TABLE `sb_admins_servers_groups` ( - `admin_id` int(10) NOT NULL, - `group_id` int(10) NOT NULL, - `srv_group_id` int(10) NOT NULL, - `server_id` int(10) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_banlog`; -CREATE TABLE `sb_banlog` ( - `sid` int(6) NOT NULL, - `time` int(11) NOT NULL, - `name` varchar(128) NOT NULL, - `bid` int(6) NOT NULL, - PRIMARY KEY (`sid`,`time`,`bid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_bans`; -CREATE TABLE `sb_bans` ( - `bid` int(6) NOT NULL AUTO_INCREMENT, - `ip` varchar(32) DEFAULT NULL, - `authid` varchar(64) NOT NULL DEFAULT '', - `name` varchar(128) NOT NULL DEFAULT 'unnamed', - `created` int(11) NOT NULL DEFAULT '0', - `ends` int(11) NOT NULL DEFAULT '0', - `length` int(10) NOT NULL DEFAULT '0', - `reason` text NOT NULL, - `aid` int(6) NOT NULL DEFAULT '0', - `adminIp` varchar(32) NOT NULL DEFAULT '', - `sid` int(6) NOT NULL DEFAULT '0', - `country` varchar(4) DEFAULT NULL, - `RemovedBy` int(8) DEFAULT NULL, - `RemoveType` varchar(3) DEFAULT NULL, - `RemovedOn` int(10) DEFAULT NULL, - `type` tinyint(4) NOT NULL DEFAULT '0', - `ureason` text, - PRIMARY KEY (`bid`), - KEY `sid` (`sid`), - KEY `type_authid` (`type`,`authid`), - KEY `type_ip` (`type`,`ip`), - FULLTEXT KEY `reason` (`reason`), - FULLTEXT KEY `authid_2` (`authid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_comments`; -CREATE TABLE `sb_comments` ( - `cid` int(6) NOT NULL AUTO_INCREMENT, - `bid` int(6) NOT NULL, - `type` varchar(1) NOT NULL, - `aid` int(6) NOT NULL, - `commenttxt` longtext NOT NULL, - `added` int(11) NOT NULL, - `editaid` int(6) DEFAULT NULL, - `edittime` int(11) DEFAULT NULL, - KEY `cid` (`cid`), - FULLTEXT KEY `commenttxt` (`commenttxt`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_comms`; -CREATE TABLE `sb_comms` ( - `bid` int(6) NOT NULL AUTO_INCREMENT, - `authid` varchar(64) NOT NULL, - `name` varchar(128) NOT NULL DEFAULT 'unnamed', - `created` int(11) NOT NULL DEFAULT '0', - `ends` int(11) NOT NULL DEFAULT '0', - `length` int(10) NOT NULL DEFAULT '0', - `reason` text NOT NULL, - `aid` int(6) NOT NULL DEFAULT '0', - `adminIp` varchar(32) NOT NULL DEFAULT '', - `sid` int(6) NOT NULL DEFAULT '0', - `RemovedBy` int(8) DEFAULT NULL, - `RemoveType` varchar(3) DEFAULT NULL, - `RemovedOn` int(11) DEFAULT NULL, - `type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '1 - Mute, 2 - Gag', - `ureason` text, - PRIMARY KEY (`bid`), - KEY `sid` (`sid`), - KEY `type` (`type`), - KEY `RemoveType` (`RemoveType`), - KEY `authid` (`authid`), - KEY `created` (`created`), - KEY `aid` (`aid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_demos`; -CREATE TABLE `sb_demos` ( - `demid` int(6) NOT NULL, - `demtype` varchar(1) NOT NULL, - `filename` varchar(128) NOT NULL, - `origname` varchar(128) NOT NULL, - PRIMARY KEY (`demid`,`demtype`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_groups`; -CREATE TABLE `sb_groups` ( - `gid` int(6) NOT NULL AUTO_INCREMENT, - `type` smallint(6) NOT NULL DEFAULT '0', - `name` varchar(128) NOT NULL DEFAULT 'unnamed', - `flags` int(10) NOT NULL, - PRIMARY KEY (`gid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_log`; -CREATE TABLE `sb_log` ( - `lid` int(11) NOT NULL AUTO_INCREMENT, - `type` enum('m','w','e') NOT NULL, - `title` varchar(512) NOT NULL, - `message` text NOT NULL, - `function` text NOT NULL, - `query` text NOT NULL, - `aid` int(11) NOT NULL, - `host` text NOT NULL, - `created` int(11) NOT NULL, - PRIMARY KEY (`lid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_login_tokens`; -CREATE TABLE `sb_login_tokens` ( - `jti` varchar(16) NOT NULL, - `secret` varchar(64) NOT NULL, - `lastAccessed` int(11) NOT NULL, - PRIMARY KEY (`jti`), - UNIQUE KEY `secret` (`secret`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_mods`; -CREATE TABLE `sb_mods` ( - `mid` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(128) NOT NULL, - `icon` varchar(128) NOT NULL, - `modfolder` varchar(64) NOT NULL, - `steam_universe` tinyint(4) NOT NULL DEFAULT '0', - `enabled` tinyint(4) NOT NULL DEFAULT '1', - PRIMARY KEY (`mid`), - UNIQUE KEY `modfolder` (`modfolder`), - UNIQUE KEY `name` (`name`), - KEY `steam_universe` (`steam_universe`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_overrides`; -CREATE TABLE `sb_overrides` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `type` enum('command','group') NOT NULL, - `name` varchar(32) NOT NULL, - `flags` varchar(30) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `type` (`type`,`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_protests`; -CREATE TABLE `sb_protests` ( - `pid` int(6) NOT NULL AUTO_INCREMENT, - `bid` int(6) NOT NULL, - `datesubmitted` int(11) NOT NULL, - `reason` text NOT NULL, - `email` varchar(128) NOT NULL, - `archiv` tinyint(1) DEFAULT '0', - `archivedby` int(11) DEFAULT NULL, - `pip` varchar(64) NOT NULL, - PRIMARY KEY (`pid`), - KEY `bid` (`bid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_servers`; -CREATE TABLE `sb_servers` ( - `sid` int(6) NOT NULL AUTO_INCREMENT, - `ip` varchar(64) NOT NULL, - `port` int(5) NOT NULL, - `rcon` varchar(64) NOT NULL, - `modid` int(10) NOT NULL, - `enabled` tinyint(4) NOT NULL DEFAULT '1', - PRIMARY KEY (`sid`), - UNIQUE KEY `ip` (`ip`,`port`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_servers_groups`; -CREATE TABLE `sb_servers_groups` ( - `server_id` int(10) NOT NULL, - `group_id` int(10) NOT NULL, - PRIMARY KEY (`server_id`,`group_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_settings`; -CREATE TABLE `sb_settings` ( - `setting` varchar(128) NOT NULL, - `value` text NOT NULL, - UNIQUE KEY `setting` (`setting`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_srvgroups`; -CREATE TABLE `sb_srvgroups` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `flags` varchar(30) NOT NULL, - `immunity` int(10) unsigned NOT NULL, - `name` varchar(120) NOT NULL, - `groups_immune` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_srvgroups_overrides`; -CREATE TABLE `sb_srvgroups_overrides` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `group_id` smallint(5) unsigned NOT NULL, - `type` enum('command','group') NOT NULL, - `name` varchar(32) NOT NULL, - `access` enum('allow','deny') NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `group_id` (`group_id`,`type`,`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - -DROP TABLE IF EXISTS `sb_submissions`; -CREATE TABLE `sb_submissions` ( - `subid` int(6) NOT NULL AUTO_INCREMENT, - `submitted` int(11) NOT NULL, - `ModID` int(6) NOT NULL, - `SteamId` varchar(64) NOT NULL DEFAULT 'unnamed', - `name` varchar(128) NOT NULL, - `email` varchar(128) NOT NULL, - `reason` text NOT NULL, - `ip` varchar(64) NOT NULL, - `subname` varchar(128) DEFAULT NULL, - `sip` varchar(64) DEFAULT NULL, - `archiv` tinyint(1) DEFAULT '0', - `archivedby` int(11) DEFAULT NULL, - `server` tinyint(3) DEFAULT NULL, - PRIMARY KEY (`subid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - - --- 2023-01-15 12:36:07 +-- 2023-09-14 02:07:16 diff --git a/sourcebans.sql b/sourcebans.sql new file mode 100644 index 000000000..8b8669165 --- /dev/null +++ b/sourcebans.sql @@ -0,0 +1,276 @@ +-- Adminer 4.8.1 MySQL 5.7.41 dump + +SET NAMES utf8; +SET time_zone = '+00:00'; +SET foreign_key_checks = 0; +SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; + +SET NAMES utf8mb4; + +DROP TABLE IF EXISTS `sb_admins`; +CREATE TABLE `sb_admins` ( + `aid` int(6) NOT NULL AUTO_INCREMENT, + `user` varchar(64) NOT NULL, + `authid` varchar(64) NOT NULL DEFAULT '', + `password` varchar(128) NOT NULL, + `gid` int(6) NOT NULL, + `email` varchar(128) NOT NULL, + `validate` varchar(128) DEFAULT NULL, + `extraflags` int(10) NOT NULL, + `immunity` int(10) NOT NULL DEFAULT '0', + `srv_group` varchar(128) DEFAULT NULL, + `srv_flags` varchar(64) DEFAULT NULL, + `srv_password` varchar(128) DEFAULT NULL, + `lastvisit` int(11) DEFAULT NULL, + PRIMARY KEY (`aid`), + UNIQUE KEY `user` (`user`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_admins_servers_groups`; +CREATE TABLE `sb_admins_servers_groups` ( + `admin_id` int(10) NOT NULL, + `group_id` int(10) NOT NULL, + `srv_group_id` int(10) NOT NULL, + `server_id` int(10) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_banlog`; +CREATE TABLE `sb_banlog` ( + `sid` int(6) NOT NULL, + `time` int(11) NOT NULL, + `name` varchar(128) NOT NULL, + `bid` int(6) NOT NULL, + PRIMARY KEY (`sid`,`time`,`bid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_bans`; +CREATE TABLE `sb_bans` ( + `bid` int(6) NOT NULL AUTO_INCREMENT, + `ip` varchar(32) DEFAULT NULL, + `authid` varchar(64) NOT NULL DEFAULT '', + `name` varchar(128) NOT NULL DEFAULT 'unnamed', + `created` int(11) NOT NULL DEFAULT '0', + `ends` int(11) NOT NULL DEFAULT '0', + `length` int(10) NOT NULL DEFAULT '0', + `reason` text NOT NULL, + `aid` int(6) NOT NULL DEFAULT '0', + `adminIp` varchar(32) NOT NULL DEFAULT '', + `sid` int(6) NOT NULL DEFAULT '0', + `country` varchar(4) DEFAULT NULL, + `RemovedBy` int(8) DEFAULT NULL, + `RemoveType` varchar(3) DEFAULT NULL, + `RemovedOn` int(10) DEFAULT NULL, + `type` tinyint(4) NOT NULL DEFAULT '0', + `ureason` text, + PRIMARY KEY (`bid`), + KEY `sid` (`sid`), + KEY `type_authid` (`type`,`authid`), + KEY `type_ip` (`type`,`ip`), + FULLTEXT KEY `reason` (`reason`), + FULLTEXT KEY `authid_2` (`authid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_comments`; +CREATE TABLE `sb_comments` ( + `cid` int(6) NOT NULL AUTO_INCREMENT, + `bid` int(6) NOT NULL, + `type` varchar(1) NOT NULL, + `aid` int(6) NOT NULL, + `commenttxt` longtext NOT NULL, + `added` int(11) NOT NULL, + `editaid` int(6) DEFAULT NULL, + `edittime` int(11) DEFAULT NULL, + KEY `cid` (`cid`), + FULLTEXT KEY `commenttxt` (`commenttxt`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_comms`; +CREATE TABLE `sb_comms` ( + `bid` int(6) NOT NULL AUTO_INCREMENT, + `authid` varchar(64) NOT NULL, + `name` varchar(128) NOT NULL DEFAULT 'unnamed', + `created` int(11) NOT NULL DEFAULT '0', + `ends` int(11) NOT NULL DEFAULT '0', + `length` int(10) NOT NULL DEFAULT '0', + `reason` text NOT NULL, + `aid` int(6) NOT NULL DEFAULT '0', + `adminIp` varchar(32) NOT NULL DEFAULT '', + `sid` int(6) NOT NULL DEFAULT '0', + `RemovedBy` int(8) DEFAULT NULL, + `RemoveType` varchar(3) DEFAULT NULL, + `RemovedOn` int(11) DEFAULT NULL, + `type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '1 - Mute, 2 - Gag', + `ureason` text, + PRIMARY KEY (`bid`), + KEY `sid` (`sid`), + KEY `type` (`type`), + KEY `RemoveType` (`RemoveType`), + KEY `authid` (`authid`), + KEY `created` (`created`), + KEY `aid` (`aid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_demos`; +CREATE TABLE `sb_demos` ( + `demid` int(6) NOT NULL, + `demtype` varchar(1) NOT NULL, + `filename` varchar(128) NOT NULL, + `origname` varchar(128) NOT NULL, + PRIMARY KEY (`demid`,`demtype`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_groups`; +CREATE TABLE `sb_groups` ( + `gid` int(6) NOT NULL AUTO_INCREMENT, + `type` smallint(6) NOT NULL DEFAULT '0', + `name` varchar(128) NOT NULL DEFAULT 'unnamed', + `flags` int(10) NOT NULL, + PRIMARY KEY (`gid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_log`; +CREATE TABLE `sb_log` ( + `lid` int(11) NOT NULL AUTO_INCREMENT, + `type` enum('m','w','e') NOT NULL, + `title` varchar(512) NOT NULL, + `message` text NOT NULL, + `function` text NOT NULL, + `query` text NOT NULL, + `aid` int(11) NOT NULL, + `host` text NOT NULL, + `created` int(11) NOT NULL, + PRIMARY KEY (`lid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_login_tokens`; +CREATE TABLE `sb_login_tokens` ( + `jti` varchar(16) NOT NULL, + `secret` varchar(64) NOT NULL, + `lastAccessed` int(11) NOT NULL, + PRIMARY KEY (`jti`), + UNIQUE KEY `secret` (`secret`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_mods`; +CREATE TABLE `sb_mods` ( + `mid` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(128) NOT NULL, + `icon` varchar(128) NOT NULL, + `modfolder` varchar(64) NOT NULL, + `steam_universe` tinyint(4) NOT NULL DEFAULT '0', + `enabled` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`mid`), + UNIQUE KEY `modfolder` (`modfolder`), + UNIQUE KEY `name` (`name`), + KEY `steam_universe` (`steam_universe`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_overrides`; +CREATE TABLE `sb_overrides` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` enum('command','group') NOT NULL, + `name` varchar(32) NOT NULL, + `flags` varchar(30) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `type` (`type`,`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_protests`; +CREATE TABLE `sb_protests` ( + `pid` int(6) NOT NULL AUTO_INCREMENT, + `bid` int(6) NOT NULL, + `datesubmitted` int(11) NOT NULL, + `reason` text NOT NULL, + `email` varchar(128) NOT NULL, + `archiv` tinyint(1) DEFAULT '0', + `archivedby` int(11) DEFAULT NULL, + `pip` varchar(64) NOT NULL, + PRIMARY KEY (`pid`), + KEY `bid` (`bid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_servers`; +CREATE TABLE `sb_servers` ( + `sid` int(6) NOT NULL AUTO_INCREMENT, + `ip` varchar(64) NOT NULL, + `port` int(5) NOT NULL, + `rcon` varchar(64) NOT NULL, + `modid` int(10) NOT NULL, + `enabled` tinyint(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`sid`), + UNIQUE KEY `ip` (`ip`,`port`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_servers_groups`; +CREATE TABLE `sb_servers_groups` ( + `server_id` int(10) NOT NULL, + `group_id` int(10) NOT NULL, + PRIMARY KEY (`server_id`,`group_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_settings`; +CREATE TABLE `sb_settings` ( + `setting` varchar(128) NOT NULL, + `value` text NOT NULL, + UNIQUE KEY `setting` (`setting`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_srvgroups`; +CREATE TABLE `sb_srvgroups` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `flags` varchar(30) NOT NULL, + `immunity` int(10) unsigned NOT NULL, + `name` varchar(120) NOT NULL, + `groups_immune` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_srvgroups_overrides`; +CREATE TABLE `sb_srvgroups_overrides` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `group_id` smallint(5) unsigned NOT NULL, + `type` enum('command','group') NOT NULL, + `name` varchar(32) NOT NULL, + `access` enum('allow','deny') NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `group_id` (`group_id`,`type`,`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +DROP TABLE IF EXISTS `sb_submissions`; +CREATE TABLE `sb_submissions` ( + `subid` int(6) NOT NULL AUTO_INCREMENT, + `submitted` int(11) NOT NULL, + `ModID` int(6) NOT NULL, + `SteamId` varchar(64) NOT NULL DEFAULT 'unnamed', + `name` varchar(128) NOT NULL, + `email` varchar(128) NOT NULL, + `reason` text NOT NULL, + `ip` varchar(64) NOT NULL, + `subname` varchar(128) DEFAULT NULL, + `sip` varchar(64) DEFAULT NULL, + `archiv` tinyint(1) DEFAULT '0', + `archivedby` int(11) DEFAULT NULL, + `server` tinyint(3) DEFAULT NULL, + PRIMARY KEY (`subid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + + +-- 2023-09-14 02:09:54