Remove fk constraints in expedition tables

Add expedition tables to database schema lists
This commit is contained in:
hg
2020-06-30 19:59:31 -04:00
parent e8d250827d
commit 70161aecc4
5 changed files with 53 additions and 33 deletions
+1 -2
View File
@@ -17,8 +17,7 @@ CREATE TABLE `dynamic_zones` (
`zone_in_heading` FLOAT NOT NULL DEFAULT 0,
`has_zone_in` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `instance_id` (`instance_id`),
CONSTRAINT `FK_dynamic_zones_instance_list` FOREIGN KEY (`instance_id`) REFERENCES `instance_list` (`id`) ON DELETE CASCADE
UNIQUE INDEX `instance_id` (`instance_id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
+6 -9
View File
@@ -1,7 +1,7 @@
CREATE TABLE `expedition_details` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`uuid` VARCHAR(36) NOT NULL,
`instance_id` INT(10) NULL DEFAULT NULL,
`instance_id` INT(10) NOT NULL,
`expedition_name` VARCHAR(128) NOT NULL,
`leader_id` INT(10) UNSIGNED NOT NULL DEFAULT 0,
`min_players` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
@@ -9,8 +9,7 @@ CREATE TABLE `expedition_details` (
`add_replay_on_join` TINYINT(3) UNSIGNED NOT NULL DEFAULT 1,
`is_locked` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `instance_id` (`instance_id`),
CONSTRAINT `FK_expedition_details_instance_list` FOREIGN KEY (`instance_id`) REFERENCES `instance_list` (`id`) ON DELETE SET NULL
UNIQUE INDEX `instance_id` (`instance_id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
@@ -24,8 +23,7 @@ CREATE TABLE `expedition_lockouts` (
`duration` INT(10) UNSIGNED NOT NULL DEFAULT 0,
`from_expedition_uuid` VARCHAR(36) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `expedition_id_event_name` (`expedition_id`, `event_name`),
CONSTRAINT `FK_expedition_lockouts_expedition_details` FOREIGN KEY (`expedition_id`) REFERENCES `expedition_details` (`id`) ON DELETE CASCADE
UNIQUE INDEX `expedition_id_event_name` (`expedition_id`, `event_name`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
@@ -36,8 +34,7 @@ CREATE TABLE `expedition_members` (
`expedition_id` INT(10) UNSIGNED NOT NULL DEFAULT 0,
`character_id` INT(10) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `expedition_id_character_id` (`expedition_id`, `character_id`),
CONSTRAINT `FK_expedition_members_expedition_details` FOREIGN KEY (`expedition_id`) REFERENCES `expedition_details` (`id`) ON DELETE CASCADE
UNIQUE INDEX `expedition_id_character_id` (`expedition_id`, `character_id`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
@@ -46,11 +43,11 @@ ENGINE=InnoDB
CREATE TABLE `expedition_character_lockouts` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`character_id` INT(10) UNSIGNED NOT NULL,
`expedition_name` VARCHAR(128) NOT NULL,
`event_name` VARCHAR(256) NOT NULL,
`expire_time` DATETIME NOT NULL DEFAULT current_timestamp(),
`duration` INT(10) UNSIGNED NOT NULL DEFAULT 0,
`from_expedition_uuid` VARCHAR(36) NOT NULL,
`expedition_name` VARCHAR(128) NOT NULL,
`event_name` VARCHAR(256) NOT NULL,
`is_pending` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `character_id_expedition_name_event_name` (`character_id`, `expedition_name`, `event_name`)