|
| 1 | +-- run if dropping and creating the tables for the first time or wanting to start fresh on anticheat stats |
| 2 | +CREATE TABLE IF NOT EXISTS `daily_players_reports` ( |
| 3 | + `guid` int unsigned NOT NULL DEFAULT 0, |
| 4 | + `creation_time` int unsigned NOT NULL DEFAULT 0, |
| 5 | + `average` float NOT NULL DEFAULT 0, |
| 6 | + `total_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 7 | + `speed_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 8 | + `fly_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 9 | + `jump_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 10 | + `waterwalk_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 11 | + `teleportplane_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 12 | + `climb_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 13 | + `teleport_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 14 | + `ignorecontrol_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 15 | + `zaxis_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 16 | + `antiswim_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 17 | + `gravity_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 18 | + `antiknockback_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 19 | + `no_fall_damage_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 20 | + `op_ack_hack_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 21 | + `counter_measures_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 22 | + PRIMARY KEY (`guid`) |
| 23 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
| 24 | + |
| 25 | +CREATE TABLE IF NOT EXISTS `players_reports_status` ( |
| 26 | + `guid` int unsigned NOT NULL DEFAULT 0, |
| 27 | + `creation_time` int unsigned NOT NULL DEFAULT 0, |
| 28 | + `average` float NOT NULL DEFAULT 0, |
| 29 | + `total_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 30 | + `speed_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 31 | + `fly_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 32 | + `jump_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 33 | + `waterwalk_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 34 | + `teleportplane_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 35 | + `climb_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 36 | + `teleport_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 37 | + `ignorecontrol_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 38 | + `zaxis_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 39 | + `antiswim_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 40 | + `gravity_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 41 | + `antiknockback_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 42 | + `no_fall_damage_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 43 | + `op_ack_hack_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 44 | + `counter_measures_reports` bigint unsigned NOT NULL DEFAULT 0, |
| 45 | + PRIMARY KEY (`guid`) |
| 46 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
| 47 | + |
| 48 | +CREATE TABLE IF NOT EXISTS `lua_cheaters` ( |
| 49 | + `guid` int unsigned NOT NULL DEFAULT 0, |
| 50 | + `account` int unsigned NOT NULL DEFAULT 0, |
| 51 | + `macro` varchar(255) NOT NULL DEFAULT '', |
| 52 | + PRIMARY KEY (`guid`,`account`) |
| 53 | +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
| 54 | + |
| 55 | +-- run only if updating from previous table versions |
| 56 | +ALTER TABLE `daily_players_reports` |
| 57 | + ADD COLUMN `teleport_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `climb_reports`, |
| 58 | + ADD COLUMN `ignorecontrol_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `teleport_reports`, |
| 59 | + ADD COLUMN `zaxis_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `ignorecontrol_reports`, |
| 60 | + ADD COLUMN `antiswim_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `zaxis_reports`, |
| 61 | + ADD COLUMN `gravity_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `antiswim_reports`; |
| 62 | + ADD COLUMN `antiknockback_reports` bigint unsigned NOT NULL DEFAULT 0 AFTER `gravity_reports`; |
| 63 | + ADD COLUMN `no_fall_damage_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `antiknockback_reports`; |
| 64 | + ADD COLUMN `op_ack_hack_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `no_fall_damage_reports`; |
| 65 | + ADD COLUMN `counter_measures_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `op_ack_hack_reports`; |
| 66 | + |
| 67 | +ALTER TABLE `players_reports_status` |
| 68 | + ADD COLUMN `teleport_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `climb_reports`, |
| 69 | + ADD COLUMN `ignorecontrol_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `teleport_reports`, |
| 70 | + ADD COLUMN `zaxis_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `ignorecontrol_reports`, |
| 71 | + ADD COLUMN `antiswim_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `zaxis_reports`, |
| 72 | + ADD COLUMN `gravity_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `antiswim_reports`; |
| 73 | + ADD COLUMN `antiknockback_reports` bigint unsigned NOT NULL DEFAULT 0 AFTER `gravity_reports`; |
| 74 | + ADD COLUMN `no_fall_damage_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `antiknockback_reports`; |
| 75 | + ADD COLUMN `op_ack_hack_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `no_fall_damage_reports`; |
| 76 | + ADD COLUMN `counter_measures_reports` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `op_ack_hack_reports`; |
0 commit comments