-- GroupVerify's tables, in CS2-SimpleAdmin's database. Applied once at load, tracked in -- gv_migrations (like SimpleAdmin's sa_migrations, kept apart so neither confuses the other). -- Times are wall-clock values in gv_settings' timezone, which should match SimpleAdmin's Timezone. -- One row per player and source. A player counts as verified if they have a 'group' row, or a -- row with `override` = 1 whose expires_at is NULL (never) or still ahead. -- source 'group': written by the plugin when Steam's Web API says they're in the group (checked -- as they join), `override` 0. Deleted when Steam says they aren't. -- source 'manual': written by the web panel, `override` 1, expires_at NULL or a date. -- updated_at is when Steam last confirmed a group row. CREATE TABLE IF NOT EXISTS `gv_verified` ( `steamid64` bigint(20) NOT NULL, `source` enum('group','manual') NOT NULL, `override` tinyint(1) NOT NULL DEFAULT 0, `expires_at` datetime NULL DEFAULT NULL, `added_by` varchar(128) NOT NULL DEFAULT '', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`steamid64`, `source`), KEY `idx_gv_verified_override` (`override`, `expires_at`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; -- Plugin settings, name -> value. The plugin adds any missing name with its default at load, and -- rereads them on every database reload, so edits apply without a restart. CREATE TABLE IF NOT EXISTS `gv_settings` ( `name` varchar(64) NOT NULL, `value` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;