[MIRROR] Chat history prototype (#10278)

Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-03-02 17:22:34 +01:00
committed by GitHub
co-authored by Selis Kashargul
parent 36231619db
commit 09bb0e61b3
33 changed files with 746 additions and 235 deletions
+19
View File
@@ -231,3 +231,22 @@ CREATE TABLE IF NOT EXISTS `round` (
`station_name` VARCHAR(80) NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE IF NOT EXISTS `chatlogs_ckeys` (
`ckey` varchar(45) NOT NULL,
`token` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ckey`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE IF NOT EXISTS `chatlogs_logs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`round_id` int(11) NOT NULL DEFAULT -1,
`target` varchar(45) NOT NULL,
`text` mediumtext NOT NULL,
`text_raw` mediumtext NOT NULL,
`type` varchar(128) DEFAULT NULL,
`created_at` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `chatlogs_ckeys_FK` (`target`),
CONSTRAINT `chatlogs_ckeys_FK` FOREIGN KEY (`target`) REFERENCES `chatlogs_ckeys` (`ckey`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;