From e19f20ca535cd65467349ff42ae1d322b692d6f2 Mon Sep 17 00:00:00 2001 From: Matt <116982774+Burzah@users.noreply.github.com> Date: Sat, 8 Jun 2024 22:38:46 +0000 Subject: [PATCH] SQL Changes for Lamp Bloom PR (#25863) * Changes copied from #24534 * Adds NOT NULL constraint to the new columns --- SQL/paradise_schema.sql | 2 ++ SQL/updates/56-57.sql | 6 ++++++ code/__DEFINES/misc_defines.dm | 2 +- config/example/config.toml | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 SQL/updates/56-57.sql diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql index 8a476cb63b6..831fb0a5a46 100644 --- a/SQL/paradise_schema.sql +++ b/SQL/paradise_schema.sql @@ -280,6 +280,8 @@ CREATE TABLE `player` ( `toggles` int(11) DEFAULT NULL, `toggles_2` int(11) DEFAULT NULL, `sound` mediumint(8) DEFAULT '31', + `light` MEDIUMINT(3) NOT NULL DEFAULT '7', + `glowlevel` TINYINT(1) NOT NULL DEFAULT '1', `volume_mixer` LONGTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL, `lastchangelog` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0', `exp` LONGTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL, diff --git a/SQL/updates/56-57.sql b/SQL/updates/56-57.sql new file mode 100644 index 00000000000..87d3b427b51 --- /dev/null +++ b/SQL/updates/56-57.sql @@ -0,0 +1,6 @@ +# Updating SQL from 56 to 57 - MrRomainzZ and Burza +# Add light settings to player preferences + +ALTER TABLE `player` + ADD COLUMN `light` MEDIUMINT(3) NOT NULL DEFAULT '7' AFTER `sound`, + ADD COLUMN `glowlevel` TINYINT(1) NOT NULL DEFAULT '1' AFTER `light`; diff --git a/code/__DEFINES/misc_defines.dm b/code/__DEFINES/misc_defines.dm index ee394a0e13e..3275a2d2e1b 100644 --- a/code/__DEFINES/misc_defines.dm +++ b/code/__DEFINES/misc_defines.dm @@ -403,7 +403,7 @@ #define INVESTIGATE_HOTMIC "hotmic" // The SQL version required by this version of the code -#define SQL_VERSION 56 +#define SQL_VERSION 57 // Vending machine stuff #define CAT_NORMAL (1<<0) diff --git a/config/example/config.toml b/config/example/config.toml index 48884d6a092..ad5c0a5073a 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -175,7 +175,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 = 56 +sql_version = 57 # SQL server address. Can be an IP or DNS name sql_address = "127.0.0.1" # SQL server port