mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 08:34:16 +01:00
Game Preferences Update (#13936)
This commit is contained in:
@@ -255,20 +255,15 @@ CREATE TABLE `player` (
|
||||
`be_role` mediumtext,
|
||||
`default_slot` smallint(4) DEFAULT '1',
|
||||
`toggles` int(8) DEFAULT '383',
|
||||
`toggles_2` int(8) DEFAULT '14',
|
||||
`sound` mediumint(8) DEFAULT '31',
|
||||
`randomslot` tinyint(1) DEFAULT '0',
|
||||
`volume` smallint(4) DEFAULT '100',
|
||||
`nanoui_fancy` smallint(4) DEFAULT '1',
|
||||
`show_ghostitem_attack` smallint(4) DEFAULT '1',
|
||||
`lastchangelog` varchar(32) NOT NULL DEFAULT '0',
|
||||
`windowflashing` smallint(4) DEFAULT '1',
|
||||
`ghost_anonsay` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`exp` mediumtext,
|
||||
`clientfps` smallint(4) DEFAULT '0',
|
||||
`atklog` smallint(4) DEFAULT '0',
|
||||
`fuid` bigint(20) NULL DEFAULT NULL,
|
||||
`fupdate` smallint(4) NULL DEFAULT '0',
|
||||
`afk_watch` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`parallax` tinyint(1) DEFAULT '8',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `ckey` (`ckey`)
|
||||
|
||||
@@ -254,20 +254,15 @@ CREATE TABLE `SS13_player` (
|
||||
`be_role` mediumtext,
|
||||
`default_slot` smallint(4) DEFAULT '1',
|
||||
`toggles` int(8) DEFAULT '383',
|
||||
`toggles_2` int(8) DEFAULT '14',
|
||||
`sound` mediumint(8) DEFAULT '31',
|
||||
`randomslot` tinyint(1) DEFAULT '0',
|
||||
`volume` smallint(4) DEFAULT '100',
|
||||
`nanoui_fancy` smallint(4) DEFAULT '1',
|
||||
`show_ghostitem_attack` smallint(4) DEFAULT '1',
|
||||
`lastchangelog` varchar(32) NOT NULL DEFAULT '0',
|
||||
`windowflashing` smallint(4) DEFAULT '1',
|
||||
`ghost_anonsay` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`exp` mediumtext,
|
||||
`clientfps` smallint(4) DEFAULT '0',
|
||||
`atklog` smallint(4) DEFAULT '0',
|
||||
`fuid` bigint(20) NULL DEFAULT NULL,
|
||||
`fupdate` smallint(4) NULL DEFAULT '0',
|
||||
`afk_watch` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`parallax` tinyint(1) DEFAULT '8',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `ckey` (`ckey`)
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#Updating the SQL from version 12 to version 13. -AffectedArc07
|
||||
#Modifying the player table to remove old columns and add a new bitflag column for toggles
|
||||
#Includes conversion from old to new
|
||||
|
||||
ALTER TABLE `player` ADD COLUMN `toggles_2` INT NULL DEFAULT '0' AFTER `toggles`;
|
||||
|
||||
# The following lines will update the new toggles_2 column based on existing data
|
||||
UPDATE `player` SET `toggles_2` = `toggles_2` + 1 WHERE `randomslot` = 1;
|
||||
UPDATE `player` SET `toggles_2` = `toggles_2` + 2 WHERE `nanoui_fancy` = 1;
|
||||
UPDATE `player` SET `toggles_2` = `toggles_2` + 4 WHERE `show_ghostitem_attack` = 1;
|
||||
UPDATE `player` SET `toggles_2` = `toggles_2` + 8 WHERE `windowflashing` = 1;
|
||||
UPDATE `player` SET `toggles_2` = `toggles_2` + 16 WHERE `ghost_anonsay` = 1;
|
||||
UPDATE `player` SET `toggles_2` = `toggles_2` + 32 WHERE `afk_watch` = 1;
|
||||
|
||||
# Remove the old columns
|
||||
ALTER TABLE `player`
|
||||
DROP COLUMN `randomslot`,
|
||||
DROP COLUMN `nanoui_fancy`,
|
||||
DROP COLUMN `show_ghostitem_attack`,
|
||||
DROP COLUMN `windowflashing`,
|
||||
DROP COLUMN `ghost_anonsay`,
|
||||
DROP COLUMN `afk_watch`;
|
||||
Reference in New Issue
Block a user