Merge edge into feat/title-conditions: §3's zone presets
All checks were successful
PR Checks / server-tests (pull_request) Successful in 24s
PR Checks / frozen-manifest (pull_request) Successful in 36s
PR Checks / client-build (pull_request) Successful in 7m39s

Two conflicts, both additive: schema.sql and purge.sql keep both phases'
tables. Swagger fragment (61 paths) and routes.manifest (67 routes)
regenerated against the pinned core; 455 server and 58 client tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
2026-09-29 11:36:00 -05:00
17 changed files with 2162 additions and 1 deletions

View File

@@ -19,6 +19,10 @@
-- it knows this module registered, because it is the side that knows which
-- registrant owned what.
-- Zone presets (PLAN_REDESIGNS §3.1). The server list before its preset.
DROP TABLE IF EXISTS rust_zone_preset_servers;
DROP TABLE IF EXISTS rust_zone_presets;
-- The chat-title conditions (PLAN_REDESIGNS §5). No foreign keys; the stats
-- columns go with their table below.
DROP TABLE IF EXISTS rust_title_categories;

View File

@@ -1221,3 +1221,41 @@ CREATE TABLE IF NOT EXISTS rust_title_categories (
updated_by INT NULL,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ── Zone presets (PLAN_REDESIGNS §3.1, D195, D210) ─────────────────────────
--
-- A set of ZoneManager flags and settings an admin saved under a name, for one
-- server, several, or the whole fleet. None ship with the module: what an
-- "arena" is differs by server. A zone step copies a preset's options into its
-- own field when the preset is picked (D210), so editing a preset later leaves
-- every published event as it was.
--
-- `flags` is a JSON array of names as ZoneManager spells them, `settings` a JSON
-- object of the plugin's allowlisted settings. Both are TEXT, not JSON: MariaDB's
-- JSON is an alias the driver hands back as a string either way.
CREATE TABLE IF NOT EXISTS rust_zone_presets (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(64) NOT NULL,
flags TEXT NOT NULL,
settings TEXT NOT NULL,
-- 1: every server, including servers added later. 0: exactly the servers
-- `rust_zone_preset_servers` names. The shape of a shared group (§1.4).
all_servers TINYINT(1) NOT NULL DEFAULT 0,
created_by INT NULL,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
-- Not unique: two servers may each have their own "Arena" (D189's rule for
-- groups). The model refuses two of one name on one server.
KEY idx_rust_zone_presets_name (name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS rust_zone_preset_servers (
preset_id INT UNSIGNED NOT NULL,
server_id VARCHAR(64) NOT NULL,
PRIMARY KEY (preset_id, server_id),
KEY idx_rust_zone_preset_servers_server (server_id),
CONSTRAINT fk_rust_zone_preset_servers_preset
FOREIGN KEY (preset_id) REFERENCES rust_zone_presets (id) ON DELETE CASCADE,
CONSTRAINT fk_rust_zone_preset_servers_server
FOREIGN KEY (server_id) REFERENCES rust_servers (id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;