mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-09 07:54:14 +00:00
Note fading and persistent messages
Player Notes can now fade out over time so admins don't accidentally ban players for 4 year old notes Deleted messages now remain in the database and are instead just hidden from view. Two things relating to messages I've been meaning to do for ever.
This commit is contained in:
@@ -1,13 +1,27 @@
|
||||
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.3; The query to update the schema revision table is:
|
||||
The latest database version is 3.4; The query to update the schema revision table is:
|
||||
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 3);
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (3, 4);
|
||||
or
|
||||
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (3, 3);
|
||||
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (3, 4);
|
||||
|
||||
In any query remember to add a prefix to the table names if you use one.
|
||||
|
||||
----------------------------------------------------
|
||||
In any query remember to add a prefix to the table names if you use one.
|
||||
|
||||
28 August 2017, by MrStonedOne
|
||||
Modified table 'messages', adding a deleted column and editing all indexes to include it
|
||||
|
||||
ALTER TABLE `messages`
|
||||
ADD COLUMN `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `edits`,
|
||||
DROP INDEX `idx_msg_ckey_time`,
|
||||
DROP INDEX `idx_msg_type_ckeys_time`,
|
||||
DROP INDEX `idx_msg_type_ckey_time_odr`,
|
||||
ADD INDEX `idx_msg_ckey_time` (`targetckey`,`timestamp`, `deleted`),
|
||||
ADD INDEX `idx_msg_type_ckeys_time` (`type`,`targetckey`,`adminckey`,`timestamp`, `deleted`),
|
||||
ADD INDEX `idx_msg_type_ckey_time_odr` (`type`,`targetckey`,`timestamp`, `deleted`);
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
25 August 2017, by Jordie0608
|
||||
|
||||
@@ -254,10 +254,11 @@ CREATE TABLE `messages` (
|
||||
`secret` tinyint(1) unsigned NOT NULL,
|
||||
`lasteditor` varchar(32) DEFAULT NULL,
|
||||
`edits` text,
|
||||
`deleted` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_msg_ckey_time` (`targetckey`,`timestamp`),
|
||||
KEY `idx_msg_type_ckeys_time` (`type`,`targetckey`,`adminckey`,`timestamp`),
|
||||
KEY `idx_msg_type_ckey_time_odr` (`type`,`targetckey`,`timestamp`)
|
||||
KEY `idx_msg_ckey_time` (`targetckey`,`timestamp`, `deleted`),
|
||||
KEY `idx_msg_type_ckeys_time` (`type`,`targetckey`,`adminckey`,`timestamp`, `deleted`),
|
||||
KEY `idx_msg_type_ckey_time_odr` (`type`,`targetckey`,`timestamp`, `deleted`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ CREATE TABLE `SS13_admin` (
|
||||
-- Table structure for table `SS13_admin_log`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `SS13_dmin_log`;
|
||||
DROP TABLE IF EXISTS `SS13_admin_log`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `SS13_admin_log` (
|
||||
@@ -254,10 +254,11 @@ CREATE TABLE `SS13_messages` (
|
||||
`secret` tinyint(1) unsigned NOT NULL,
|
||||
`lasteditor` varchar(32) DEFAULT NULL,
|
||||
`edits` text,
|
||||
`deleted` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_msg_ckey_time` (`targetckey`,`timestamp`),
|
||||
KEY `idx_msg_type_ckeys_time` (`type`,`targetckey`,`adminckey`,`timestamp`),
|
||||
KEY `idx_msg_type_ckey_time_odr` (`type`,`targetckey`,`timestamp`)
|
||||
KEY `idx_msg_ckey_time` (`targetckey`,`timestamp`, `deleted`),
|
||||
KEY `idx_msg_type_ckeys_time` (`type`,`targetckey`,`adminckey`,`timestamp`, `deleted`),
|
||||
KEY `idx_msg_type_ckey_time_odr` (`type`,`targetckey`,`timestamp`, `deleted`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user