Splits up round table initialize, start, end and shutdown (#37665)

For planned change to how TGS initializes server instances ahead of time so rounds aren't tracked as being far longer than they really would be. Similarly end time split for a more accurate round duration.
This commit is contained in:
Jordie
2018-05-15 17:11:39 +10:00
committed by oranges
parent 49db9f8184
commit 37854a5489
7 changed files with 44 additions and 14 deletions

View File

@@ -1,15 +1,28 @@
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.3; The query to update the schema revision table is:
The latest database version is 4.4; The query to update the schema revision table is:
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 3);
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 4);
or
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 3);
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 4);
In any query remember to add a prefix to the table names if you use one.
----------------------------------------------------
Version 4.4, 9 May 2018, by Jordie0608
Modified table `round`, renaming column `start_datetime` to `initialize_datetime` and `end_datetime` to `shutdown_datetime` and adding columns to replace both under the same name in preparation for changes to TGS server initialization.
ALTER TABLE `round`
ALTER `start_datetime` DROP DEFAULT;
ALTER TABLE `round`
CHANGE COLUMN `start_datetime` `initialize_datetime` DATETIME NOT NULL AFTER `id`,
ADD COLUMN `start_datetime` DATETIME NULL DEFAULT NULL AFTER `initialize_datetime`,
CHANGE COLUMN `end_datetime` `shutdown_datetime` DATETIME NULL DEFAULT NULL AFTER `start_datetime`,
ADD COLUMN `end_datetime` DATETIME NULL DEFAULT NULL AFTER `shutdown_datetime`;
----------------------------------------------------
Version 4.3, 9 May 2018, by MrStonedOne
Added table `role_time_log` and triggers `role_timeTlogupdate`, `role_timeTloginsert` and `role_timeTlogdelete` to update it from changes to `role_time`

View File

@@ -421,7 +421,9 @@ DROP TABLE IF EXISTS `round`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `round` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`start_datetime` DATETIME NOT NULL,
`initialize_datetime` DATETIME NOT NULL,
`start_datetime` DATETIME NULL,
`shutdown_datetime` DATETIME NULL,
`end_datetime` DATETIME NULL,
`server_ip` INT(10) UNSIGNED NOT NULL,
`server_port` SMALLINT(5) UNSIGNED NOT NULL,

View File

@@ -421,7 +421,9 @@ DROP TABLE IF EXISTS `SS13_round`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `SS13_round` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`start_datetime` DATETIME NOT NULL,
`initialize_datetime` DATETIME NOT NULL,
`start_datetime` DATETIME NULL,
`shutdown_datetime` DATETIME NULL,
`end_datetime` DATETIME NULL,
`server_ip` INT(10) UNSIGNED NOT NULL,
`server_port` SMALLINT(5) UNSIGNED NOT NULL,