234 lines
12 KiB
SQL
234 lines
12 KiB
SQL
/*M!999999\- enable the sandbox mode */
|
|
|
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
|
/*!40101 SET NAMES utf8mb4 */;
|
|
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
|
/*!40103 SET TIME_ZONE='+00:00' */;
|
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
|
DROP TABLE IF EXISTS `bug_report_attachments`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `bug_report_attachments` (
|
|
`attachment_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`report_id` bigint(20) unsigned NOT NULL,
|
|
`attachment_type` varchar(32) NOT NULL DEFAULT 'screenshot',
|
|
`file_name` varchar(255) NOT NULL,
|
|
`file_path` varchar(1024) NOT NULL,
|
|
`mime_type` varchar(128) DEFAULT NULL,
|
|
`file_size` bigint(20) unsigned DEFAULT NULL,
|
|
`description` varchar(255) DEFAULT NULL,
|
|
`created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
|
PRIMARY KEY (`attachment_id`),
|
|
KEY `idx_bug_report_attachments_report_id` (`report_id`),
|
|
KEY `idx_bug_report_attachments_type` (`attachment_type`),
|
|
KEY `idx_bug_report_attachments_created_at` (`created_at`),
|
|
CONSTRAINT `fk_bug_report_attachments_report` FOREIGN KEY (`report_id`) REFERENCES `bug_reports` (`report_id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `bug_reports`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `bug_reports` (
|
|
`report_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`report_token` varchar(96) DEFAULT NULL,
|
|
`bug_id` bigint(20) unsigned DEFAULT NULL,
|
|
`source_type` varchar(32) NOT NULL DEFAULT 'player',
|
|
`reported_severity` varchar(16) NOT NULL DEFAULT 'unknown',
|
|
`status` varchar(16) NOT NULL DEFAULT 'open',
|
|
`account_id` bigint(20) unsigned DEFAULT NULL,
|
|
`character_guid` bigint(20) unsigned DEFAULT NULL,
|
|
`character_name` varchar(64) DEFAULT NULL,
|
|
`title` varchar(255) DEFAULT NULL,
|
|
`description` text NOT NULL,
|
|
`expected_behavior` text DEFAULT NULL,
|
|
`reproduction_notes` text DEFAULT NULL,
|
|
`reproducible` tinyint(1) DEFAULT NULL,
|
|
`map_id` int(10) unsigned DEFAULT NULL,
|
|
`zone_id` int(10) unsigned DEFAULT NULL,
|
|
`area_id` int(10) unsigned DEFAULT NULL,
|
|
`position_x` float DEFAULT NULL,
|
|
`position_y` float DEFAULT NULL,
|
|
`position_z` float DEFAULT NULL,
|
|
`orientation` float DEFAULT NULL,
|
|
`target_guid` bigint(20) unsigned DEFAULT NULL,
|
|
`target_entry` int(10) unsigned DEFAULT NULL,
|
|
`target_type` varchar(32) DEFAULT NULL,
|
|
`quest_id` int(10) unsigned DEFAULT NULL,
|
|
`client_build` int(10) unsigned DEFAULT NULL,
|
|
`server_version` varchar(128) DEFAULT NULL,
|
|
`core_commit` varchar(64) DEFAULT NULL,
|
|
`context_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`context_json`)),
|
|
`created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
|
`updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
`closed_at` datetime DEFAULT NULL,
|
|
`closed_by_account_id` bigint(20) unsigned DEFAULT NULL,
|
|
`closure_reason` varchar(32) DEFAULT NULL,
|
|
`closure_note` text DEFAULT NULL,
|
|
PRIMARY KEY (`report_id`),
|
|
UNIQUE KEY `uq_bug_reports_report_token` (`report_token`),
|
|
KEY `idx_bug_reports_bug_id` (`bug_id`),
|
|
KEY `idx_bug_reports_created_at` (`created_at`),
|
|
KEY `idx_bug_reports_character` (`character_guid`),
|
|
KEY `idx_bug_reports_quest` (`quest_id`),
|
|
KEY `idx_bug_reports_target` (`target_type`,`target_entry`),
|
|
KEY `idx_bug_reports_status_created` (`status`,`created_at`),
|
|
KEY `idx_bug_reports_reported_severity` (`reported_severity`),
|
|
KEY `idx_bug_reports_zone` (`zone_id`,`area_id`),
|
|
CONSTRAINT `fk_bug_reports_bug` FOREIGN KEY (`bug_id`) REFERENCES `bugs` (`bug_id`) ON DELETE SET NULL
|
|
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `bug_reproduction_events`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `bug_reproduction_events` (
|
|
`event_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`reproduction_id` bigint(20) unsigned NOT NULL,
|
|
`source` varchar(16) NOT NULL DEFAULT 'server',
|
|
`event_time` datetime NOT NULL DEFAULT current_timestamp(),
|
|
`event_type` varchar(64) NOT NULL,
|
|
`entity_type` varchar(32) DEFAULT NULL,
|
|
`entity_id` bigint(20) unsigned DEFAULT NULL,
|
|
`entity_guid` bigint(20) unsigned DEFAULT NULL,
|
|
`data_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`data_json`)),
|
|
PRIMARY KEY (`event_id`),
|
|
KEY `idx_repro_event_reproduction` (`reproduction_id`),
|
|
KEY `idx_repro_event_type` (`event_type`),
|
|
KEY `idx_repro_event_time` (`event_time`),
|
|
KEY `idx_repro_event_source` (`source`),
|
|
CONSTRAINT `bug_reproduction_events_ibfk_1` FOREIGN KEY (`reproduction_id`) REFERENCES `bug_reproductions` (`reproduction_id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB AUTO_INCREMENT=526 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `bug_reproductions`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `bug_reproductions` (
|
|
`reproduction_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`session_token` varchar(96) DEFAULT NULL,
|
|
`bug_id` bigint(20) unsigned DEFAULT NULL,
|
|
`report_id` bigint(20) unsigned DEFAULT NULL,
|
|
`tester_account_id` bigint(20) unsigned DEFAULT NULL,
|
|
`tester_character_guid` bigint(20) unsigned DEFAULT NULL,
|
|
`tester_character_name` varchar(64) DEFAULT NULL,
|
|
`result` varchar(32) NOT NULL DEFAULT 'unknown',
|
|
`description` text DEFAULT NULL,
|
|
`steps` text DEFAULT NULL,
|
|
`observation` text DEFAULT NULL,
|
|
`map_id` int(10) unsigned DEFAULT NULL,
|
|
`zone_id` int(10) unsigned DEFAULT NULL,
|
|
`area_id` int(10) unsigned DEFAULT NULL,
|
|
`position_x` float DEFAULT NULL,
|
|
`position_y` float DEFAULT NULL,
|
|
`position_z` float DEFAULT NULL,
|
|
`orientation` float DEFAULT NULL,
|
|
`target_guid` bigint(20) unsigned DEFAULT NULL,
|
|
`target_entry` int(10) unsigned DEFAULT NULL,
|
|
`target_type` varchar(32) DEFAULT NULL,
|
|
`quest_id` int(10) unsigned DEFAULT NULL,
|
|
`diagnostic_focus_type` varchar(32) DEFAULT NULL,
|
|
`diagnostic_focus_id` bigint(20) DEFAULT NULL,
|
|
`context_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`context_json`)),
|
|
`started_at` datetime DEFAULT NULL,
|
|
`finished_at` datetime DEFAULT NULL,
|
|
`created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
|
PRIMARY KEY (`reproduction_id`),
|
|
UNIQUE KEY `uq_bug_reproductions_session_token` (`session_token`),
|
|
KEY `idx_repro_bug` (`bug_id`),
|
|
KEY `idx_repro_report` (`report_id`),
|
|
KEY `idx_repro_quest` (`quest_id`),
|
|
KEY `idx_repro_zone` (`zone_id`),
|
|
KEY `idx_repro_created` (`created_at`),
|
|
KEY `idx_bug_reproductions_diagnostic_focus` (`diagnostic_focus_type`,`diagnostic_focus_id`),
|
|
CONSTRAINT `bug_reproductions_ibfk_1` FOREIGN KEY (`bug_id`) REFERENCES `bugs` (`bug_id`) ON DELETE SET NULL,
|
|
CONSTRAINT `bug_reproductions_ibfk_2` FOREIGN KEY (`report_id`) REFERENCES `bug_reports` (`report_id`) ON DELETE SET NULL
|
|
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `bugs`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `bugs` (
|
|
`bug_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`bug_token` varchar(96) DEFAULT NULL,
|
|
`title` varchar(255) NOT NULL,
|
|
`status` varchar(32) NOT NULL DEFAULT 'new',
|
|
`severity` varchar(32) NOT NULL DEFAULT 'unknown',
|
|
`category` varchar(32) NOT NULL DEFAULT 'unknown',
|
|
`primary_entity_type` varchar(32) DEFAULT NULL,
|
|
`primary_entity_id` bigint(20) unsigned DEFAULT NULL,
|
|
`primary_map_id` int(10) unsigned DEFAULT NULL,
|
|
`primary_zone_id` int(10) unsigned DEFAULT NULL,
|
|
`primary_area_id` int(10) unsigned DEFAULT NULL,
|
|
`description` text DEFAULT NULL,
|
|
`developer_notes` mediumtext DEFAULT NULL,
|
|
`resolution_notes` mediumtext DEFAULT NULL,
|
|
`created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
|
`updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
`resolved_at` datetime DEFAULT NULL,
|
|
PRIMARY KEY (`bug_id`),
|
|
UNIQUE KEY `uq_bugs_bug_token` (`bug_token`),
|
|
KEY `idx_bugs_status` (`status`),
|
|
KEY `idx_bugs_category` (`category`),
|
|
KEY `idx_bugs_severity` (`severity`),
|
|
KEY `idx_bugs_entity` (`primary_entity_type`,`primary_entity_id`),
|
|
KEY `idx_bugs_created_at` (`created_at`),
|
|
KEY `idx_bugs_zone` (`primary_zone_id`,`primary_area_id`),
|
|
KEY `idx_bugs_updated_at` (`updated_at`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `diagnostic_event_catalog`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `diagnostic_event_catalog` (
|
|
`event_entry` tinyint(3) unsigned NOT NULL,
|
|
`display_name` varchar(128) NOT NULL,
|
|
`category` varchar(32) NOT NULL DEFAULT 'seasonal',
|
|
`enabled` tinyint(1) NOT NULL DEFAULT 1,
|
|
`sort_order` int(11) NOT NULL DEFAULT 0,
|
|
PRIMARY KEY (`event_entry`),
|
|
KEY `idx_diagnostic_event_catalog_enabled_sort` (`enabled`,`sort_order`,`display_name`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
DROP TABLE IF EXISTS `diagnostic_runs`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!40101 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `diagnostic_runs` (
|
|
`diagnostic_run_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
`run_token` varchar(96) DEFAULT NULL,
|
|
`bug_id` bigint(20) unsigned NOT NULL,
|
|
`requested_by_account_id` bigint(20) unsigned DEFAULT NULL,
|
|
`requested_by_character_guid` bigint(20) unsigned DEFAULT NULL,
|
|
`status` varchar(16) NOT NULL DEFAULT 'queued',
|
|
`claim_token` varchar(96) DEFAULT NULL,
|
|
`claimed_by` varchar(255) DEFAULT NULL,
|
|
`claimed_at` datetime DEFAULT NULL,
|
|
`created_at` datetime NOT NULL DEFAULT current_timestamp(),
|
|
`started_at` datetime DEFAULT NULL,
|
|
`finished_at` datetime DEFAULT NULL,
|
|
`output_path` text DEFAULT NULL,
|
|
`error_message` text DEFAULT NULL,
|
|
`wowdiag_version` varchar(64) DEFAULT NULL,
|
|
`core_revision` varchar(64) DEFAULT NULL,
|
|
PRIMARY KEY (`diagnostic_run_id`),
|
|
UNIQUE KEY `uq_diagnostic_runs_token` (`run_token`),
|
|
UNIQUE KEY `uq_diagnostic_runs_claim_token` (`claim_token`),
|
|
KEY `idx_diagnostic_runs_bug` (`bug_id`),
|
|
KEY `idx_diagnostic_runs_status_created` (`status`,`created_at`),
|
|
KEY `idx_diagnostic_runs_claimed_at` (`claimed_at`),
|
|
CONSTRAINT `fk_diagnostic_runs_bug` FOREIGN KEY (`bug_id`) REFERENCES `bugs` (`bug_id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
|
|
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|
|