mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-09 07:54:14 +00:00
[Ready] Database Tickets (#48727)
* DB ticket procs * Schema changes for DB tickets * Schema version update * Fixes requested by Jordie * SQL updates Adds a recipient column * Still one dangling issue where this DOESN'T WORK * Alright, this should work * Requested SQL fixes * Rogue changes * less bad defaults * utf8 for the utf8 gods * aaaaaa * Update tgstation_schema_prefixed.sql * Update tgstation_schema.sql * Update database_changelog.txt Co-authored-by: Jordie <4343468+Jordie0608@users.noreply.github.com>
This commit is contained in:
@@ -1,13 +1,32 @@
|
||||
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 5.6; The query to update the schema revision table is:
|
||||
The latest database version is 5.7; The query to update the schema revision table is:
|
||||
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 6);
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 7);
|
||||
or
|
||||
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 6);
|
||||
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 7);
|
||||
|
||||
In any query remember to add a prefix to the table names if you use one.
|
||||
|
||||
-----------------------------------------------------
|
||||
|
||||
Version 5.7, 10 January 2020 by Atlanta-Ned
|
||||
Added ticket table for tracking ahelp tickets in the database.
|
||||
|
||||
DROP TABLE IF EXISTS `ticket`;
|
||||
CREATE TABLE `ticket` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`server_ip` int(10) unsigned NOT NULL,
|
||||
`server_port` smallint(5) unsigned NOT NULL,
|
||||
`round_id` int(11) unsigned NOT NULL,
|
||||
`ticket` smallint(11) unsigned NOT NULL,
|
||||
`action` varchar(20) NOT NULL DEFAULT 'Message',
|
||||
`message` text NOT NULL,
|
||||
`timestamp` datetime NOT NULL,
|
||||
`recipient` varchar(32) DEFAULT NULL,
|
||||
`sender` varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-----------------------------------------------------
|
||||
|
||||
|
||||
@@ -537,6 +537,24 @@ CREATE TABLE `achievement_metadata` (
|
||||
PRIMARY KEY (`achievement_key`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
--
|
||||
-- Table structure for table `ticket`
|
||||
--
|
||||
DROP TABLE IF EXISTS `ticket`;
|
||||
CREATE TABLE `ticket` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`server_ip` int(10) unsigned NOT NULL,
|
||||
`server_port` smallint(5) unsigned NOT NULL,
|
||||
`round_id` int(11) unsigned NOT NULL,
|
||||
`ticket` smallint(11) unsigned NOT NULL,
|
||||
`action` varchar(20) NOT NULL DEFAULT 'Message',
|
||||
`message` text NOT NULL,
|
||||
`timestamp` datetime NOT NULL,
|
||||
`recipient` varchar(32) DEFAULT NULL,
|
||||
`sender` varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
|
||||
@@ -537,6 +537,24 @@ CREATE TABLE `SS13_achievement_metadata` (
|
||||
PRIMARY KEY (`achievement_key`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
--
|
||||
-- Table structure for table `SS13_ticket`
|
||||
--
|
||||
DROP TABLE IF EXISTS `SS13_ticket`;
|
||||
CREATE TABLE `SS13_ticket` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`server_ip` int(10) unsigned NOT NULL,
|
||||
`server_port` smallint(5) unsigned NOT NULL,
|
||||
`round_id` int(11) unsigned NOT NULL,
|
||||
`ticket` smallint(11) unsigned NOT NULL,
|
||||
`action` varchar(20) NOT NULL DEFAULT 'Message',
|
||||
`message` text NOT NULL,
|
||||
`timestamp` datetime NOT NULL,
|
||||
`recipient` varchar(32) DEFAULT NULL,
|
||||
`sender` varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
|
||||
Reference in New Issue
Block a user