32 lines
1.6 KiB
SQL
32 lines
1.6 KiB
SQL
-- Optional owner authority v1. Explicit coordinated maintenance only.
|
|
-- Requires base Cube v2 and gold-addon v2. Does not adopt legacy holds,
|
|
-- manufacture source closure, enable crafting, or install at startup.
|
|
CREATE TABLE IF NOT EXISTS port_cube_owner_version (
|
|
id INT UNSIGNED PRIMARY KEY, version INT UNSIGNED NOT NULL
|
|
) ENGINE=InnoDB;
|
|
CREATE TABLE IF NOT EXISTS port_cube_owner_broker (
|
|
id INT UNSIGNED PRIMARY KEY,
|
|
generation BIGINT UNSIGNED NOT NULL,
|
|
boot CHAR(32) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
|
connection_id BIGINT UNSIGNED NOT NULL
|
|
) ENGINE=InnoDB;
|
|
CREATE TABLE IF NOT EXISTS port_cube_owner_leases (
|
|
request CHAR(32) CHARACTER SET ascii COLLATE ascii_bin PRIMARY KEY,
|
|
account INT UNSIGNED NOT NULL, pid INT UNSIGNED NOT NULL,
|
|
body MEDIUMBLOB NOT NULL,
|
|
revision BIGINT UNSIGNED NOT NULL, generation BIGINT UNSIGNED NOT NULL,
|
|
boot CHAR(32) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
|
connection_id BIGINT UNSIGNED NOT NULL, peer INT UNSIGNED NOT NULL,
|
|
binding VARBINARY(96) NOT NULL,
|
|
original_peer INT UNSIGNED NOT NULL, original_binding VARBINARY(96) NOT NULL,
|
|
phase ENUM('LIVE','REVOKED','ADOPTED') NOT NULL,
|
|
revoked_generation BIGINT UNSIGNED NOT NULL DEFAULT 0,
|
|
reason TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
|
UNIQUE KEY held_account(account), UNIQUE KEY held_player(pid)
|
|
) ENGINE=InnoDB;
|
|
INSERT INTO port_cube_owner_broker(id,generation,boot,connection_id)
|
|
VALUES(1,0,'00000000000000000000000000000000',0)
|
|
ON DUPLICATE KEY UPDATE generation=generation;
|
|
INSERT INTO port_cube_owner_version(id,version) VALUES(1,1)
|
|
ON DUPLICATE KEY UPDATE version=version;
|