Add expiration time for admin messages (#39502)

* add expiration time for messages

* typo

* fix

* src to usr

* allows removing expiry from existing messages

* cancel button
This commit is contained in:
Jordie
2018-08-12 06:31:14 +10:00
committed by GitHub
parent c63cbdce2d
commit 31f020f3cc
8 changed files with 121 additions and 22 deletions

View File

@@ -1,15 +1,22 @@
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.5; The query to update the schema revision table is:
The latest database version is 4.6; The query to update the schema revision table is:
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 5);
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 6);
or
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 5);
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 6);
In any query remember to add a prefix to the table names if you use one.
----------------------------------------------------
Version 4.6, 11 August 2018, by Jordie0608
Modified table `messages`, adding column `expire_timestamp` to allow for auto-"deleting" messages.
ALTER TABLE `messages` ADD `expire_timestamp` DATETIME NULL DEFAULT NULL AFTER `secret`;
----------------------------------------------------
Version 4.5, 9 July 2018, by Jordie0608
Modified table `player`, adding column `byond_key` to store a user's key along with their ckey.
To populate this new column run the included script 'populate_key_2018-07', see the file for use instructions.

View File

@@ -253,6 +253,7 @@ CREATE TABLE `messages` (
`server_port` smallint(5) unsigned NOT NULL,
`round_id` int(11) unsigned NOT NULL,
`secret` tinyint(1) unsigned NOT NULL,
`expire_timestamp` datetime DEFAULT NULL,
`lasteditor` varchar(32) DEFAULT NULL,
`edits` text,
`deleted` tinyint(1) unsigned NOT NULL DEFAULT '0',

View File

@@ -253,6 +253,7 @@ CREATE TABLE `SS13_messages` (
`server_port` smallint(5) unsigned NOT NULL,
`round_id` int(11) unsigned NOT NULL,
`secret` tinyint(1) unsigned NOT NULL,
`expire_timestamp` datetime DEFAULT NULL,
`lasteditor` varchar(32) DEFAULT NULL,
`edits` text,
`deleted` tinyint(1) unsigned NOT NULL DEFAULT '0',