mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 07:32:02 +00:00
* Condense Database Migrations Condenses the Database Migrations into a new initial schema. Also adds some instructions to the Database Readme for existing setups. * Update readme/delete changed migrations since pr creation * Reworks a bit how the previous migrations are handled and updates the instructions accordingly * Expand the readme with baseline/migrate --------- Co-authored-by: Werner <Arrow768@users.noreply.github.com>
23 lines
966 B
SQL
23 lines
966 B
SQL
--
|
|
-- Implemented in PR #4432
|
|
-- Adds a table for gathering statistics regarding tickets.
|
|
--
|
|
|
|
CREATE TABLE `ss13_tickets` (
|
|
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
`game_id` VARCHAR(32) NOT NULL,
|
|
`message_count` INT(11) NOT NULL,
|
|
`admin_count` INT(11) NOT NULL,
|
|
`admin_list` TEXT NOT NULL,
|
|
`opened_by` VARCHAR(32) NOT NULL,
|
|
`taken_by` VARCHAR(32) NOT NULL,
|
|
`closed_by` VARCHAR(32) NOT NULL,
|
|
`response_delay` INT(11) NOT NULL,
|
|
`opened_at` DATETIME NOT NULL,
|
|
`closed_at` DATETIME NOT NULL,
|
|
PRIMARY KEY (`id`),
|
|
CONSTRAINT `tickets_fk_opened` FOREIGN KEY (`opened_by`) REFERENCES `ss13_player` (`ckey`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
CONSTRAINT `tickets_fk_taken` FOREIGN KEY (`taken_by`) REFERENCES `ss13_player` (`ckey`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
CONSTRAINT `tickets_fk_closed` FOREIGN KEY (`closed_by`) REFERENCES `ss13_player` (`ckey`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|