mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
last of the port
This commit is contained in:
@@ -1,16 +1,50 @@
|
||||
Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255.
|
||||
|
||||
The latest database version is 4.0; The query to update the schema revision table is:
|
||||
The latest database version is 4.1; The query to update the schema revision table is:
|
||||
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 0);
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 1);
|
||||
or
|
||||
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 0);
|
||||
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 1);
|
||||
|
||||
In any query remember to add a prefix to the table names if you use one.
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
12 November 2017, by Jordie0608
|
||||
Version 4.1, 3 February 2018, by Jordie0608
|
||||
Modified tables 'admin', 'admin_log' and 'admin_rank', removing unnecessary columns and adding support for excluding rights flags from admin ranks.
|
||||
This change was made to enable use of sql-based admin loading.
|
||||
To import your existing admins and ranks run the included script 'admin_import_2018-02-03.py', see the file for use instructions.
|
||||
Legacy file-based admin loading is still supported, if you want to continue using it the script doesn't need to be run.
|
||||
|
||||
ALTER TABLE `admin`
|
||||
CHANGE COLUMN `rank` `rank` VARCHAR(32) NOT NULL AFTER `ckey`,
|
||||
DROP COLUMN `id`,
|
||||
DROP COLUMN `level`,
|
||||
DROP COLUMN `flags`,
|
||||
DROP COLUMN `email`,
|
||||
DROP PRIMARY KEY,
|
||||
ADD PRIMARY KEY (`ckey`);
|
||||
|
||||
ALTER TABLE `admin_log`
|
||||
CHANGE COLUMN `datetime` `datetime` DATETIME NOT NULL AFTER `id`,
|
||||
CHANGE COLUMN `adminckey` `adminckey` VARCHAR(32) NOT NULL AFTER `datetime`,
|
||||
CHANGE COLUMN `adminip` `adminip` INT(10) UNSIGNED NOT NULL AFTER `adminckey`,
|
||||
ADD COLUMN `operation` ENUM('add admin','remove admin','change admin rank','add rank','remove rank','change rank flags') NOT NULL AFTER `adminip`,
|
||||
CHANGE COLUMN `log` `log` VARCHAR(1000) NOT NULL AFTER `operation`;
|
||||
|
||||
ALTER TABLE `admin_ranks`
|
||||
CHANGE COLUMN `rank` `rank` VARCHAR(32) NOT NULL FIRST,
|
||||
CHANGE COLUMN `flags` `flags` SMALLINT UNSIGNED NOT NULL AFTER `rank`,
|
||||
ADD COLUMN `exclude_flags` SMALLINT UNSIGNED NOT NULL AFTER `flags`,
|
||||
ADD COLUMN `can_edit_flags` SMALLINT(5) UNSIGNED NOT NULL AFTER `exclude_flags`,
|
||||
DROP COLUMN `id`,
|
||||
DROP PRIMARY KEY,
|
||||
ADD PRIMARY KEY (`rank`);
|
||||
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Version 4.0, 12 November 2017, by Jordie0608
|
||||
Modified feedback table to use json, a python script is used to migrate data to this new format.
|
||||
|
||||
See the file 'feedback_conversion_2017-11-12.py' for instructions on how to use the script.
|
||||
@@ -29,7 +63,7 @@ CREATE TABLE `feedback` (
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
28 August 2017, by MrStonedOne
|
||||
Version 3.4, 28 August 2017, by MrStonedOne
|
||||
Modified table 'messages', adding a deleted column and editing all indexes to include it
|
||||
|
||||
ALTER TABLE `messages`
|
||||
@@ -43,7 +77,7 @@ ADD INDEX `idx_msg_type_ckey_time_odr` (`type`,`targetckey`,`timestamp`, `delete
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
25 August 2017, by Jordie0608
|
||||
Version 3.3, 25 August 2017, by Jordie0608
|
||||
|
||||
Modified tables 'connection_log', 'legacy_population', 'library', 'messages' and 'player' to add additional 'round_id' tracking in various forms and 'server_ip' and 'server_port' to the table 'messages'.
|
||||
|
||||
@@ -55,7 +89,7 @@ ALTER TABLE `player` ADD COLUMN `firstseen_round_id` INT(11) UNSIGNED NOT NULL A
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
18 August 2017, by Cyberboss and nfreader
|
||||
Version 3.2, 18 August 2017, by Cyberboss and nfreader
|
||||
|
||||
Modified table 'death', adding the columns `last_words` and 'suicide'.
|
||||
|
||||
@@ -67,7 +101,7 @@ Remember to add a prefix to the table name if you use them.
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
20th July 2017, by Shadowlight213
|
||||
Version 3.1, 20th July 2017, by Shadowlight213
|
||||
Added role_time table to track time spent playing departments.
|
||||
Also, added flags column to the player table.
|
||||
|
||||
@@ -79,7 +113,7 @@ Remember to add a prefix to the table name if you use them.
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
28 June 2017, by oranges
|
||||
Version 3.0, 28 June 2017, by oranges
|
||||
Added schema_revision to store the current db revision, why start at 3.0?
|
||||
|
||||
because:
|
||||
@@ -319,7 +353,7 @@ Remember to add prefix to the table name if you use them.
|
||||
|
||||
Modified table 'memo', removing 'id' column and making 'ckey' primary.
|
||||
|
||||
ALTER TABLE `memo` DROP COLUMN `id`, DROP PRIMARY KEY, ADD PRIMARY KEY (`ckey`)
|
||||
ALTER TABLE `memo` DROP COLUMN `id`, DROP PRIMARY KEY, ADD PRIMARY KEY (`ckey`)
|
||||
|
||||
Remember to add prefix to the table name if you use them.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user