Store expeditions with dz id not instance id

This exposes dynamic zone ids for any future changes and will make it
easier to preserve historic dz and expedition data. This also cleans up
some dynamic zone creation for expedition requests

When purging instances the expedition table is no longer updated
since dynamic zone ids are not re-used like instance ids are

Update #dz list commands to show dz id

Add GetDynamicZoneID and get_expedition_by_dz_id quest apis
This commit is contained in:
hg
2020-10-20 23:51:30 -04:00
parent 54500b0e72
commit b46eca4ec6
19 changed files with 182 additions and 173 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
CREATE TABLE `expeditions` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`uuid` VARCHAR(36) NOT NULL,
`instance_id` INT(10) NULL DEFAULT 0,
`dynamic_zone_id` INT(10) UNSIGNED NOT NULL DEFAULT 0,
`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,7 +9,7 @@ CREATE TABLE `expeditions` (
`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`)
UNIQUE INDEX `dynamic_zone_id` (`dynamic_zone_id`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB