mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-22 08:01:06 +00:00
SQL Saves - Season 2 Episode 2 - The Fixening (#1286)
Update the schema Modify player_preferences and character related tables Readd the incidents + missing CCIAA tables to it Fix loading Fix saving Make it impossible to edit character name after a while Sanity check so you cannot enter without a valid (saved) character Fix New Character button Remove debug messages Fixes #600 Fixes #588
This commit is contained in:
@@ -112,41 +112,43 @@ CREATE TABLE `ss13_player` (
|
||||
CREATE TABLE `ss13_characters` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`name` varchar(128) NOT NULL,
|
||||
`metadata` varchar(512) DEFAULT NULL,
|
||||
`random_name` tinyint(1) DEFAULT '0',
|
||||
`gender` varchar(32) DEFAULT NULL,
|
||||
`age` int(11) DEFAULT NULL,
|
||||
`species` varchar(32) DEFAULT NULL,
|
||||
`language` varchar(128) DEFAULT NULL,
|
||||
`hair_colour` varchar(7) DEFAULT NULL,
|
||||
`facial_colour` varchar(7) DEFAULT NULL,
|
||||
`skin_tone` int(11) DEFAULT NULL,
|
||||
`skin_colour` varchar(7) DEFAULT NULL,
|
||||
`hair_style` varchar(32) DEFAULT NULL,
|
||||
`facial_style` varchar(32) DEFAULT NULL,
|
||||
`eyes_colour` varchar(7) DEFAULT NULL,
|
||||
`underwear` varchar(32) DEFAULT NULL,
|
||||
`undershirt` varchar(32) DEFAULT NULL,
|
||||
`backbag` int(11) DEFAULT NULL,
|
||||
`b_type` varchar(32) DEFAULT NULL,
|
||||
`spawnpoint` varchar(32) DEFAULT NULL,
|
||||
`jobs` text,
|
||||
`name` varchar(128) NULL DEFAULT NULL,
|
||||
`metadata` varchar(512) NULL DEFAULT NULL,
|
||||
`be_special_role` text NULL DEFAULT NULL,
|
||||
`gender` varchar(32) NULL DEFAULT NULL,
|
||||
`age` int(11) NULL DEFAULT NULL,
|
||||
`species` varchar(32) NULL DEFAULT NULL,
|
||||
`language` text NULL DEFAULT NULL,
|
||||
`hair_colour` varchar(7) NULL DEFAULT NULL,
|
||||
`facial_colour` varchar(7) NULL DEFAULT NULL,
|
||||
`skin_tone` int(11) NULL DEFAULT NULL,
|
||||
`skin_colour` varchar(7) NULL DEFAULT NULL,
|
||||
`hair_style` varchar(32) NULL DEFAULT NULL,
|
||||
`facial_style` varchar(32) NULL DEFAULT NULL,
|
||||
`eyes_colour` varchar(7) NULL DEFAULT NULL,
|
||||
`underwear` varchar(32) NULL DEFAULT NULL,
|
||||
`undershirt` varchar(32) NULL DEFAULT NULL,
|
||||
`socks` varchar(32) NULL DEFAULT NULL,
|
||||
`backbag` int(11) NULL DEFAULT NULL,
|
||||
`b_type` varchar(32) NULL DEFAULT NULL,
|
||||
`spawnpoint` varchar(32) NULL DEFAULT NULL,
|
||||
`jobs` text NULL DEFAULT NULL,
|
||||
`alternate_option` tinyint(1) DEFAULT NULL,
|
||||
`alternate_titles` text,
|
||||
`alternate_titles` text NULL DEFAULT NULL,
|
||||
`disabilities` int(11) DEFAULT '0',
|
||||
`skills` text,
|
||||
`skills_specialization` text,
|
||||
`home_system` text,
|
||||
`citizenship` text,
|
||||
`faction` text,
|
||||
`religion` text,
|
||||
`nt_relation` text,
|
||||
`uplink_location` text,
|
||||
`organs_data` text,
|
||||
`organs_robotic` text,
|
||||
`gear` text,
|
||||
`deleted_at` datetime DEFAULT NULL,
|
||||
`skills` text NULL DEFAULT NULL,
|
||||
`skill_specialization` text NULL DEFAULT NULL,
|
||||
`home_system` text NULL DEFAULT NULL,
|
||||
`citizenship` text NULL DEFAULT NULL,
|
||||
`faction` text NULL DEFAULT NULL,
|
||||
`religion` text NULL DEFAULT NULL,
|
||||
`nt_relation` text NULL DEFAULT NULL,
|
||||
`uplink_location` text NULL DEFAULT NULL,
|
||||
`organs_data` text NULL DEFAULT NULL,
|
||||
`organs_robotic` text NULL DEFAULT NULL,
|
||||
`gear` text NULL DEFAULT NULL,
|
||||
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`deleted_at` datetime NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `ss13_characters_ckey` (`ckey`),
|
||||
KEY `ss13_characteres_name` (`name`),
|
||||
@@ -155,36 +157,47 @@ CREATE TABLE `ss13_characters` (
|
||||
|
||||
CREATE TABLE `ss13_characters_flavour` (
|
||||
`char_id` int(11) NOT NULL,
|
||||
`records_employment` text,
|
||||
`records_medical` text,
|
||||
`records_security` text,
|
||||
`records_exploit` text,
|
||||
`records_ccia` text,
|
||||
`flavour_general` text,
|
||||
`flavour_head` text,
|
||||
`flavour_face` text,
|
||||
`flavour_eyes` text,
|
||||
`flavour_torso` text,
|
||||
`flavour_arms` text,
|
||||
`flavour_hands` text,
|
||||
`flavour_legs` text,
|
||||
`flavour_feet` text,
|
||||
`robot_default` text,
|
||||
`robot_standard` text,
|
||||
`robot_engineering` text,
|
||||
`robot_construction` text,
|
||||
`robot_medical` text,
|
||||
`robot_rescue` text,
|
||||
`robot_miner` text,
|
||||
`robot_custodial` text,
|
||||
`robot_service` text,
|
||||
`robot_clerical` text,
|
||||
`robot_security` text,
|
||||
`robot_research` text,
|
||||
`records_employment` text NULL DEFAULT NULL,
|
||||
`records_medical` text NULL DEFAULT NULL,
|
||||
`records_security` text NULL DEFAULT NULL,
|
||||
`records_exploit` text NULL DEFAULT NULL,
|
||||
`records_ccia` text NULL DEFAULT NULL,
|
||||
`flavour_general` text NULL DEFAULT NULL,
|
||||
`flavour_head` text NULL DEFAULT NULL,
|
||||
`flavour_face` text NULL DEFAULT NULL,
|
||||
`flavour_eyes` text NULL DEFAULT NULL,
|
||||
`flavour_torso` text NULL DEFAULT NULL,
|
||||
`flavour_arms` text NULL DEFAULT NULL,
|
||||
`flavour_hands` text NULL DEFAULT NULL,
|
||||
`flavour_legs` text NULL DEFAULT NULL,
|
||||
`flavour_feet` text NULL DEFAULT NULL,
|
||||
`robot_default` text NULL DEFAULT NULL,
|
||||
`robot_standard` text NULL DEFAULT NULL,
|
||||
`robot_engineering` text NULL DEFAULT NULL,
|
||||
`robot_construction` text NULL DEFAULT NULL,
|
||||
`robot_medical` text NULL DEFAULT NULL,
|
||||
`robot_rescue` text NULL DEFAULT NULL,
|
||||
`robot_miner` text NULL DEFAULT NULL,
|
||||
`robot_custodial` text NULL DEFAULT NULL,
|
||||
`robot_service` text NULL DEFAULT NULL,
|
||||
`robot_clerical` text NULL DEFAULT NULL,
|
||||
`robot_security` text NULL DEFAULT NULL,
|
||||
`robot_research` text NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`char_id`),
|
||||
CONSTRAINT `ss13_flavour_fk_char_id` FOREIGN KEY (`char_id`) REFERENCES `ss13_characters` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
|
||||
|
||||
CREATE TABLE `ss13_characters_log` (
|
||||
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`char_id` INT(11) NOT NULL,
|
||||
`game_id` VARCHAR(50) NOT NULL,
|
||||
`datetime` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`job_name` VARCHAR(32) NOT NULL,
|
||||
`special_role` VARCHAR(32) NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `ss13_charlog_fk_char_id` FOREIGN KEY (`char_id`) REFERENCES `ss13_characters` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `ss13_connection_log` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
@@ -325,17 +338,17 @@ CREATE TABLE `ss13_player_linking` (
|
||||
|
||||
CREATE TABLE `ss13_player_preferences` (
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`ooccolor` text NOT NULL,
|
||||
`lastchangelog` text NOT NULL,
|
||||
`UI_style` text NOT NULL,
|
||||
`current_character` int(11) NOT NULL,
|
||||
`toggles` int(11) NOT NULL,
|
||||
`UI_style_color` text NOT NULL,
|
||||
`UI_style_alpha` int(11) NOT NULL,
|
||||
`be_special` int(11) NOT NULL,
|
||||
`asfx_togs` int(11) NOT NULL,
|
||||
`lastmotd` text NOT NULL,
|
||||
`lastmemo` text NOT NULL,
|
||||
`ooccolor` text NULL DEFAULT NULL,
|
||||
`lastchangelog` text NULL DEFAULT NULL,
|
||||
`UI_style` text NULL DEFAULT NULL,
|
||||
`current_character` int(11) NULL DEFAULT NULL,
|
||||
`toggles` int(11) DEFAULT '0',
|
||||
`UI_style_color` text NULL DEFAULT NULL,
|
||||
`UI_style_alpha` int(11) NULL DEFAULT NULL,
|
||||
`asfx_togs` int(11) DEFAULT '0',
|
||||
`lastmotd` text NULL DEFAULT NULL,
|
||||
`lastmemo` text NULL DEFAULT NULL,
|
||||
`language_prefixes` text NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`ckey`),
|
||||
CONSTRAINT `player_preferences_fk_ckey` FOREIGN KEY (`ckey`) REFERENCES `ss13_player` (`ckey`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
@@ -518,5 +531,45 @@ CREATE TABLE `ss13_character_incidents` (
|
||||
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`deleted_at` DATETIME NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `UID_char_id` (`char_id`, `UID`)
|
||||
COLLATE='utf8_bin' ENGINE=InnoDB;
|
||||
UNIQUE INDEX `UID_char_id` (`char_id`, `UID`),
|
||||
) COLLATE='utf8_bin' ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `discord_channels` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`channel_group` varchar(32) NOT NULL,
|
||||
`channel_id` text NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `ss13_ccia_actions` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`title` text COLLATE utf8_unicode_ci NOT NULL,
|
||||
`type` enum('injunction','suspension','warning','other') COLLATE utf8_unicode_ci NOT NULL,
|
||||
`issuedby` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`details` text COLLATE utf8_unicode_ci NOT NULL,
|
||||
`url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`expires_at` date DEFAULT NULL,
|
||||
`deleted_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
CREATE TABLE `ss13_ccia_action_char` (
|
||||
`action_id` int(10) unsigned NOT NULL,
|
||||
`char_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`action_id`,`char_id`),
|
||||
KEY `ccia_action_char_char_id_foreign` (`char_id`),
|
||||
CONSTRAINT `ccia_action_char_action_id_foreign` FOREIGN KEY (`action_id`) REFERENCES `ss13_ccia_actions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `ccia_action_char_char_id_foreign` FOREIGN KEY (`char_id`) REFERENCES `ss13_characters` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
CREATE TABLE `ss13_ccia_general_notice_list` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`message` text COLLATE utf8_unicode_ci NOT NULL,
|
||||
`deleted_at` timestamp NULL DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
Reference in New Issue
Block a user