Add logging of deathgasp last words and suicide stats to the death table

This commit is contained in:
CitadelStationBot
2017-08-20 19:41:58 -05:00
parent 2181449c7d
commit 3862fb5d5e
7 changed files with 39 additions and 9 deletions

View File

@@ -1,15 +1,36 @@
diff a/SQL/database_changelog.txt b/SQL/database_changelog.txt (rejected hunks)
@@ -1,10 +1,10 @@
@@ -1,26 +1,20 @@
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 3.1; The query to update the schema revision table is:
+The latest database version is 3.0; The query to update the schema revision table is:
-The latest database version is 3.2; The query to update the schema revision table is:
+The latest database version is 3.1; The query to update the schema revision table is:
-UPDATE `schema_revision` SET major = 3, minor = 1 LIMIT 1;
+INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 0);
-INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 2);
+INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 1);
or
-UPDATE `SS13_schema_revision` SET major = 3, minor = 1 LIMIT 1;
+INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (3, 0);
-INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (3, 2);
+INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (3, 1);
----------------------------------------------------
-18 August 2017, by nfreader, bump to 3.2
+18 August 2017, by Cyberboss and nfreader, bump to 3.1
-Modified table 'death', adding the column 'suicide'.
+Modified table 'death', adding the columns `last_words` and 'suicide'.
-ALTER TABLE `death` ADD COLUMN `suicide` tinyint(0) NOT NULL DEFAULT '0' AFTER `last_words`
-
-----------------------------------------------------
-
-16 August 2017, by Cyberboss, bump to 3.1
-
-Modified table 'death', adding the column 'last_words'.
-
-ALTER TABLE `death` ADD COLUMN `last_words` varchar(255) DEFAULT NULL AFTER `staminaloss`
+ALTER TABLE `death`
+ADD COLUMN `last_words` varchar(255) DEFAULT NULL AFTER `staminaloss`,
+ADD COLUMN `suicide` tinyint(0) NOT NULL DEFAULT '0' AFTER `last_words`;
----------------------------------------------------

View File

@@ -151,6 +151,8 @@ CREATE TABLE `death` (
`toxloss` smallint(5) unsigned NOT NULL,
`cloneloss` smallint(5) unsigned NOT NULL,
`staminaloss` smallint(5) unsigned NOT NULL,
`last_words` varchar(255) DEFAULT NULL,
`suicide` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

View File

@@ -148,6 +148,8 @@ CREATE TABLE `SS13_death` (
`toxloss` smallint(5) unsigned NOT NULL,
`cloneloss` smallint(5) unsigned NOT NULL,
`staminaloss` smallint(5) unsigned NOT NULL,
`last_words` varchar(255) DEFAULT NULL,
`suicide` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;