Files
firefrost-services/services/arbiter-3.0/migrations/139_server_config.sql
Claude (Chronicler #83 - The Compiler) d16a525ffc Server Command Center: full build (REQ-2026-04-14)
New files:
- 139_server_config.sql — DB migration for short_name system
- 139_seed_server_config.js — auto-populates 17 servers from Pterodactyl
- src/services/uptimeKuma.js — Socket.IO direct (no npm wrapper)
- src/services/pterodactyl.js — power actions + console commands

Modified files:
- servers.js — 6 new POST routes (short-name, lock, createserver,
  delserver, power, console) + short_name-based channel detection
- _server_card.ejs — full rebuild with command center UI
- _matrix_body.ejs — refactored from 144 lines to 20 (uses partial)
- package.json — added socket.io-client

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 20:37:46 -05:00

25 lines
867 B
SQL

-- Migration 139: Server Command Center — server_config table
-- Creates the foundation for short_name-based Discord channel detection
-- and server management from Trinity Console.
CREATE TABLE IF NOT EXISTS server_config (
server_identifier VARCHAR(36) PRIMARY KEY,
short_name VARCHAR(64) UNIQUE,
short_name_locked BOOLEAN DEFAULT false,
display_name VARCHAR(128),
restart_enabled BOOLEAN DEFAULT true,
restart_offset_minutes INTEGER DEFAULT 0,
node VARCHAR(8),
pterodactyl_name VARCHAR(128),
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
-- Index for fast short_name lookups (channel detection)
CREATE INDEX IF NOT EXISTS idx_server_config_short_name
ON server_config (short_name);
-- Index for node-based queries (matrix grouping)
CREATE INDEX IF NOT EXISTS idx_server_config_node
ON server_config (node);