Some checks are pending
nopch-build / ubuntu-22.04-clang-15-nopch (push) Waiting to run
nopch-build / ubuntu-24.04-clang-18-nopch (push) Waiting to run
nopch-build / ubuntu-24.04-gcc-14-nopch (push) Waiting to run
pch-build / ubuntu-22.04-clang-15-pch (push) Waiting to run
pch-build / ubuntu-24.04-clang-18-pch (push) Waiting to run
nopch-module-build / ubuntu-24.04-clang-18-nopch-modules (push) Waiting to run
Dashboard CI / Test Bash Scripts (push) Waiting to run
Dashboard CI / Test Bash Scripts-1 (push) Waiting to run
Dashboard CI / Build and Integration Test (push) Waiting to run
Dashboard CI / Build and Integration Test-1 (push) Waiting to run
docker-build / build-containers (push) Waiting to run
import-pending / import-pending (push) Waiting to run
macos-build / macos-14 (push) Waiting to run
tools / ubuntu-24.04-clang-18 (push) Waiting to run
windows-build / windows-latest (push) Waiting to run
45 lines
1.5 KiB
SQL
45 lines
1.5 KiB
SQL
-- DB update 2026_04_12_00 -> 2026_05_15_00
|
|
--
|
|
CREATE TABLE lost_corpses (
|
|
lost_corpse_id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
|
|
player_guid BIGINT UNSIGNED NOT NULL,
|
|
corpse_guid BIGINT UNSIGNED NULL,
|
|
map_id SMALLINT UNSIGNED NOT NULL,
|
|
zone_id SMALLINT UNSIGNED NOT NULL,
|
|
position_x FLOAT NOT NULL,
|
|
position_y FLOAT NOT NULL,
|
|
position_z FLOAT NOT NULL,
|
|
orientation FLOAT NOT NULL,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
money BIGINT UNSIGNED DEFAULT 0,
|
|
active TINYINT(1) NOT NULL DEFAULT 1,
|
|
|
|
INDEX idx_player_guid (player_guid),
|
|
INDEX idx_corpse_guid (corpse_guid),
|
|
INDEX idx_map_zone (map_id, zone_id)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
|
|
CREATE TABLE lost_corpse_items (
|
|
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
|
|
lost_corpse_id BIGINT UNSIGNED NOT NULL,
|
|
item_entry INT UNSIGNED NOT NULL,
|
|
count INT UNSIGNED NOT NULL DEFAULT 1,
|
|
randomPropertyId INT DEFAULT 0,
|
|
durability INT UNSIGNED DEFAULT 0,
|
|
enchantments TEXT,
|
|
looted TINYINT(1) NOT NULL DEFAULT 0,
|
|
|
|
CONSTRAINT fk_lost_corpse
|
|
FOREIGN KEY (lost_corpse_id)
|
|
REFERENCES lost_corpses(lost_corpse_id)
|
|
ON DELETE CASCADE,
|
|
|
|
INDEX idx_lost_corpse_id (lost_corpse_id),
|
|
INDEX idx_item_entry (item_entry)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
|
|
ALTER TABLE lost_corpses
|
|
ADD UNIQUE KEY uniq_lookup (player_guid, corpse_guid, created_at);
|
|
|
|
ALTER TABLE lost_corpses
|
|
ADD COLUMN money_collected TINYINT(1) NOT NULL DEFAULT 0;
|