From d5ec3cdb72ba121881aed726b1d398e4a36364da Mon Sep 17 00:00:00 2001 From: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com> Date: Sun, 4 May 2025 08:22:48 -0400 Subject: [PATCH] SQL changes for quirks (#28956) * Put it over here * wrong * over here as well * Fixes it actually this time --- SQL/paradise_schema.sql | 1 + SQL/updates/66-67.sql | 4 ++++ code/__DEFINES/misc_defines.dm | 2 +- config/example/config.toml | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 SQL/updates/66-67.sql diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql index ac44ede929c..5663a4ac378 100644 --- a/SQL/paradise_schema.sql +++ b/SQL/paradise_schema.sql @@ -83,6 +83,7 @@ CREATE TABLE `characters` ( `runechat_color` VARCHAR(7) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#FFFFFF', `cyborg_brain_type` ENUM('MMI', 'Robobrain', 'Positronic') NOT NULL DEFAULT 'MMI', `pda_ringtone` VARCHAR(16) NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci', + `quirks` LONGTEXT COLLATE 'utf8mb4_unicode_ci' DEFAULT NULL, PRIMARY KEY (`id`), KEY `ckey` (`ckey`) ) ENGINE=InnoDB AUTO_INCREMENT=125467 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; diff --git a/SQL/updates/66-67.sql b/SQL/updates/66-67.sql new file mode 100644 index 00000000000..ef4a19f6b3e --- /dev/null +++ b/SQL/updates/66-67.sql @@ -0,0 +1,4 @@ +#Updates the DB from 66 to 67 +#Adds a column to the characters table that stores quirks in a JSON format +ALTER TABLE `characters` + ADD column `quirks` LONGTEXT COLLATE 'utf8mb4_unicode_ci' DEFAULT NULL AFTER `pda_ringtone`; diff --git a/code/__DEFINES/misc_defines.dm b/code/__DEFINES/misc_defines.dm index 3aebdd2d8ec..f344f422427 100644 --- a/code/__DEFINES/misc_defines.dm +++ b/code/__DEFINES/misc_defines.dm @@ -437,7 +437,7 @@ #define INVESTIGATE_WIRES "wires" // The SQL version required by this version of the code -#define SQL_VERSION 66 +#define SQL_VERSION 67 // Vending machine stuff #define CAT_NORMAL (1<<0) diff --git a/config/example/config.toml b/config/example/config.toml index 45d2b9ddbd2..fd0636251e7 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -173,7 +173,7 @@ ipc_screens = [ # Enable/disable the database on a whole sql_enabled = false # SQL version. If this is a mismatch, round start will be delayed -sql_version = 66 +sql_version = 67 # SQL server address. Can be an IP or DNS name sql_address = "127.0.0.1" # SQL server port