From a1cb26da5d96fe8a132a890bbca9dd7c75e9e36d Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Sat, 16 Oct 2021 06:37:34 +1100 Subject: [PATCH] feat(sql): Setup proper keys and collation - These fields should only be referenced, so index them for faster queries --- esx_multicharacter.sql | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/esx_multicharacter.sql b/esx_multicharacter.sql index 6aba96ad..23c894a5 100644 --- a/esx_multicharacter.sql +++ b/esx_multicharacter.sql @@ -1,7 +1,9 @@ CREATE TABLE `multicharacter_slots` ( - `identifier` VARCHAR(60) NOT NULL, - `slots` INT NOT NULL -); - -ALTER TABLE `users` - ADD `disabled` BIT NOT NULL DEFAULT 0; \ No newline at end of file + `identifier` VARCHAR(60) NOT NULL COLLATE 'utf8mb4_unicode_ci', + `slots` INT(11) NOT NULL, + PRIMARY KEY (`identifier`) USING BTREE, + INDEX `slots` (`slots`) USING BTREE +) +COLLATE='utf8mb4_unicode_ci' +ENGINE=InnoDB +;