-- ═══════════════════════════════════════════════════════
-- Blair Dashboard — MySQL Schema
-- Ausführen mit: mysql -u root -p < schema.sql
-- ODER: Im phpMyAdmin / DBeaver importieren
-- ═══════════════════════════════════════════════════════
CREATE DATABASE IF NOT EXISTS blair_dashboard
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE blair_dashboard;
-- Dedizierter DB-User (sicherer als root)
-- Passe Passwort an und führe das als root aus:
-- CREATE USER 'blair_user'@'localhost' IDENTIFIED BY 'SICHERES_PASSWORT';
-- GRANT ALL PRIVILEGES ON blair_dashboard.* TO 'blair_user'@'localhost';
-- FLUSH PRIVILEGES;
-- ─── Sessions ───────────────────────────────────────────
CREATE TABLE IF NOT EXISTS sessions (
session_id VARCHAR(128) NOT NULL PRIMARY KEY,
expires INT(11) UNSIGNED NOT NULL,
data MEDIUMTEXT,
INDEX idx_expires (expires)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ─── Users (Discord Login Cache) ────────────────────────
CREATE TABLE IF NOT EXISTS users (
discord_id VARCHAR(30) NOT NULL PRIMARY KEY,
username VARCHAR(100) NOT NULL DEFAULT '',
avatar VARCHAR(255) NOT NULL DEFAULT '',
last_login DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ─── Admin Whitelist ────────────────────────────────────
CREATE TABLE IF NOT EXISTS admin_whitelist (
discord_id VARCHAR(30) NOT NULL PRIMARY KEY,
discord_username VARCHAR(100) NOT NULL DEFAULT '',
added_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
added_by VARCHAR(100) NOT NULL DEFAULT 'system'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ─── Ghosts ─────────────────────────────────────────────
CREATE TABLE IF NOT EXISTS ghosts (
id VARCHAR(80) NOT NULL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
evidence JSON NOT NULL DEFAULT '[]',
sanity TINYINT NOT NULL DEFAULT 50,
hunt VARCHAR(20) NOT NULL DEFAULT 'mid',
sanity_special VARCHAR(255) NOT NULL DEFAULT '',
tip TEXT NOT NULL DEFAULT '',
description TEXT NOT NULL DEFAULT '',
tells JSON NOT NULL DEFAULT '[]',
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
updated_by VARCHAR(100) NOT NULL DEFAULT 'system',
INDEX idx_name (name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ─── Submissions ────────────────────────────────────────
CREATE TABLE IF NOT EXISTS submissions (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
ghost_name VARCHAR(100) NOT NULL DEFAULT '',
type VARCHAR(20) NOT NULL DEFAULT 'tip',
username VARCHAR(100) NOT NULL DEFAULT 'Anonym',
discord_id VARCHAR(30) DEFAULT NULL,
content TEXT NOT NULL,
status VARCHAR(20) NOT NULL DEFAULT 'pending',
admin_note TEXT NOT NULL DEFAULT '',
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
reviewed_at DATETIME DEFAULT NULL,
reviewed_by VARCHAR(100) DEFAULT NULL,
INDEX idx_status (status),
INDEX idx_discord_id (discord_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ─── Default Ghosts ─────────────────────────────────────
INSERT IGNORE INTO ghosts (id, name, evidence, sanity, hunt, sanity_special, tip, description, tells) VALUES
('banshee','Banshee','["EMF","Freezing","SLS"]',50,'mid','Target individual sanity — not team average','Special Scream via Parabolic Mic · höhere Wahrscheinlichkeit Weinen','The Banshee chooses a single target and only chases that player until they die, then re-rolls.','[{"icon":"🎙️","text":"Parabolic scream audible within ~28 studs"},{"icon":"😢","text":"Crying Event more common than most ghosts"},{"icon":"🎯","text":"Ignores all others — only chases its chosen target"},{"icon":"📻","text":"Music Box: ignores non-target if target is inside"}]'),
('demon','Demon','["Freezing","Writing","SpiritBox"]',90,'high','Hunts at 90% — most aggressive','Wird schneller nach jedem Kill · Crucifix Range 2.25× · 1/30 Chance Crucifix ignorieren','The most dangerous ghost — hunts near-constantly and gains speed after every kill.','[{"icon":"⚡","text":"90% sanity threshold — can hunt within seconds"},{"icon":"💨","text":"Gains speed after every successful kill"},{"icon":"✝️","text":"Crucifix range +40 studs AND 60s cooldown post-burn"},{"icon":"🎲","text":"1/30 chance it roars and ignores the crucifix"}]'),
('faejkur','Faejkur','["EMF","Freezing","Writing"]',50,'mid','Standard 50%','Mimt Sounds eine Oktave tiefer · Fake Footsteps im Hunt','Copies ambient sounds and replays them one octave lower.','[{"icon":"🎵","text":"All mimicked sounds play at one octave lower"},{"icon":"👣","text":"Fake footsteps during hunts"},{"icon":"😂","text":"Parabolic Microphone picks up a unique Faejkur laugh"},{"icon":"📡","text":"Mimicked EMF: smooth single tone instead of choppy beeps"}]'),
('harrow','Harrow','["Writing","Orbs","SLS"]',50,'mid','+10% per player in its room (stacks)','Kann nicht roamen · Schnell im Raum, langsam außerhalb','The only ghost permanently bound to its favorite room.','[{"icon":"📍","text":"Cannot roam — permanently glued to its favorite room"},{"icon":"🏃","text":"Revenant-fast inside, very slow far from its room"},{"icon":"🧂","text":"Salt outside the favorite room = not Harrow"},{"icon":"😭","text":"Cannot perform Crying Event outside its room"}]'),
('jiangshi','Jiangshi','["Freezing","UV","SLS"]',50,'mid','Standard 50% · Added May 2026','3× repetitive actions · skips letters on Spirit Board · skips 2nd salt footstep','Everything happens in threes. Any interaction triggers three times consecutively.','[{"icon":"3️⃣","text":"Any interaction repeats exactly 3 times"},{"icon":"📋","text":"Spirit Board skips letters (KITCHEN → K T C H E N)"},{"icon":"🧂","text":"May skip exactly the 2nd footstep in salt"},{"icon":"👣","text":"Occasional hop during hunts — skipped footstep audio"}]'),
('krasue','Krasue','["EMF","Freezing","UV"]',50,'mid','Standard 50%','Schwimmender Kopf near Kerzen · Kerzen verlangsamen sie','The only ghost with a unique visual model — a floating head.','[{"icon":"💀","text":"Unique floating head model — 10% base + 10% per lit candle"},{"icon":"🕯️","text":"Each lit candle slows head form by 1 speed (max −5)"},{"icon":"🕯️","text":"Stack candles to nullify its LOS speed boost"},{"icon":"✝️","text":"Crucifix in ghost room documented to block appearance change"}]'),
('lament','Lament','["EMF","Orbs","SpiritBox"]',50,'mid','Standard 50% · No LOS speed','Kann Hunt Fake beenden → Lights stop, silent, NV works but hunt still active','Extremely deceptive — near the end of a hunt it goes completely silent.','[{"icon":"🔇","text":"Near hunt end: goes silent — no heartbeat, lights stop"},{"icon":"💡","text":"Lights stop BUT doors remain locked — still in a hunt!"},{"icon":"🔄","text":"No LOS speed boost — fully loopable"},{"icon":"⚡","text":"Very rare: drains all nearby players stamina during manifestation"}]'),
('mare','Mare','["Freezing","SpiritBox","SLS"]',50,'mid','35% when lit; 50% in darkness','Kein Lightflickers · Kann nicht jagen wenn Raumlicht an','The darkness-dependent ghost. Cannot hunt while its room light is on.','[{"icon":"💡","text":"Cannot hunt while its room ceiling light is on"},{"icon":"🕯️","text":"Blows out candles within 90 studs (vs. 40 for others)"},{"icon":"💥","text":"5% chance to shatter the light bulb when turning it off"},{"icon":"⚡","text":"EMF spike when light goes OFF — flip the switch to test"}]'),
('nook','Nook','["EMF","Freezing","Orbs"]',50,'mid','25% when in highest-item room','Kann Raum wechseln · Klaut Items · Favorite Room = meisten Items','The roam king — its favorite room is wherever the most items are.','[{"icon":"🏃","text":"Roams most — favors room with most items"},{"icon":"💨","text":"Can make nearby objects completely vanish"},{"icon":"🌡️","text":"Multiple cold rooms = Nook or Yama"},{"icon":"📦","text":"Lure tactic: pile items in a room to redirect its favorite room"}]'),
('oni','Oni','["Writing","UV","SLS"]',50,'mid','Standard 50% · Weakens permanently','Opens & closes doors during hunt · fast salt steps · Cannot Sing','Starts very dangerous but permanently weakens each time players use incense, crucifixes, or salt.','[{"icon":"📉","text":"Permanently slows each time stunned by incense or salt"},{"icon":"🧂","text":"Salt footstep speed audibly decreases as it weakens"},{"icon":"🚪","text":"Opens and closes doors during hunts"},{"icon":"🎵","text":"Cannot perform Singing Event"}]'),
('phantom','Phantom','["SLS","UV","Orbs"]',50,'mid','Standard 50% · Added May 2026','Invisible on Video Camera · Photo flash stuns 3s','Camera-shy and invisible to video feeds.','[{"icon":"📷","text":"Photo flash stuns for 3 seconds (once per 2 min)"},{"icon":"📹","text":"Invisible on Video Cameras/CCTV"},{"icon":"👻","text":"Photo during Flash/Fake Hunt events = completely disappears"},{"icon":"🎥","text":"Does not disrupt CCTV footage at all"}]'),
('poltergeist','Poltergeist','["UV","Orbs","SpiritBox"]',50,'mid','Standard 50%','Aggresiv mit Türen/Items · Poltsplosion: bis zu 10 Items gleichzeitig','The chaos thrower — can launch up to 10 items simultaneously.','[{"icon":"💥","text":"Poltsplosion — throws up to 10 items simultaneously"},{"icon":"🔌","text":"Only ghost that consistently interacts with electronics during hunts"},{"icon":"📚","text":"Can throw Ghost Writing Books"},{"icon":"📦","text":"Test: pile items in ghost room — if they explode outward = Poltergeist"}]'),
('revenant','Revenant','["EMF","Writing","UV"]',50,'mid','Standard 50%','Normale Footsteps (Salt) = No Revenant · slow → LOS = very fast','The most extreme speed swing in the game.','[{"icon":"👁️","text":"Extremely slow without LOS, blisteringly fast on LOS"},{"icon":"🏃","text":"Incense stun reverts to base slow speed"},{"icon":"💡","text":"Performs Light Event more often than most ghosts"},{"icon":"🧂","text":"Fast salt-step audio (shared with Demon, Harrow)"}]'),
('shade','Shade','["EMF","Writing","SLS"]',35,'low','35% — lowest in game · Very passive','Red Lights Event kann nicht durch Shade · Schnelle Interaktion = Kein Shade','Almost never hunts. Activity drops dramatically with players nearby.','[{"icon":"👥","text":"Activity drops ~80% when any player is in its room"},{"icon":"🚫","text":"Cannot do: Physical Manifestation, Fake Hunt, Flash, Red Lights, Singing"},{"icon":"🔮","text":"Appears translucent from Summoning Circle, won\'t hunt"},{"icon":"⚡","text":"Incense stun lasts ~6 seconds"}]'),
('spirit','Spirit','["Writing","UV","SpiritBox"]',50,'mid','Standard 50% · Incense vulnerable','Incense stun 6s (vs 2s) · 3 min hunt block after cleanse','Average baseline ghost but uniquely vulnerable to incense.','[{"icon":"🌿","text":"Incense stun lasts 6 seconds (vs 2s for others)"},{"icon":"🛡️","text":"Cleansing ghost room blocks hunts for 3 minutes"},{"icon":"⛔","text":"Ghost halts completely before regaining speed after incense"},{"icon":"🧘","text":"Less likely to throw the Incense Burner item"}]'),
('strigoi','Strigoi','["EMF","UV","Orbs"]',50,'mid','Standard 50% · Water interaction','UV 4 Finger · turning off water can start a hunt · invisible near water','Water-powered — near active water sources it can turn completely invisible.','[{"icon":"🖐️","text":"4-fingered handprint on UV — unique to Strigoi"},{"icon":"💧","text":"Near running water: can fade completely invisible"},{"icon":"🚰","text":"Turn off activated tap: 1/8 chance to instantly trigger a hunt"},{"icon":"👁️","text":"Slowest blink rate in game away from water"}]'),
('vuult','Vuult','["EMF","Orbs","SLS"]',50,'variable','Variable 0–100% based on Vuultage charge (0–16+)','Vuultage charge · Each point = +10% sanity threshold · Smashes EMF at 16','Its threat is determined by Vuultage charge (0–16+).','[{"icon":"⚡","text":"Vuultage: +2 per nearby electric device, +5 generator on, +10 thunderstorm"},{"icon":"📈","text":"Each charge point raises hunt threshold by 10%"},{"icon":"💥","text":"At 16+ charge: can smash your EMF Reader during hunt"},{"icon":"💡","text":"Performs Light Events frequently, tampers with breaker early"}]'),
('wraith','Wraith','["Freezing","Orbs","SLS"]',50,'mid','Standard 50% · Keine Steps im Salz','Keine Steps im Salz · Teleportiert zu Spielern','Never steps in salt — the single most reliable identification tell.','[{"icon":"🧂","text":"NEVER steps in salt — 100% confirmation"},{"icon":"🌀","text":"Can teleport to any random player — triggers EMF 2"},{"icon":"👻","text":"Floating animation during Flash Events"},{"icon":"📡","text":"SLS rig may hover rather than walk"}]'),
('yama','Yama','["Writing","SpiritBox","SLS"]',50,'mid','Standard 50% · Incense = 2 min locked','Roams constantly · incense sticks it 2 min · Spirit Box loud roar','Changes its favorite room every time it roams — roams constantly.','[{"icon":"🗣️","text":"Spirit Box roar/growl instead of whisper — unique Yama response"},{"icon":"🚶","text":"Changes favorite room every time it roams"},{"icon":"📡","text":"SLS rig can wander outside the ghost room"},{"icon":"⏸️","text":"Incense locks Yama in place for 2 full minutes"}]'),
('yurei','Yurei','["Freezing","UV","SpiritBox"]',50,'mid','Standard 50% · Mostly blind','Macht Auto nicht an · takes time to even step on salt','Almost blind but hyper-aware of sound.','[{"icon":"👁️","text":"Mostly blind — stationary players with no electronics may be ignored"},{"icon":"👂","text":"Exceptional hearing — any movement or electronic = pursuit"},{"icon":"🔄","text":"No LOS speed boost — fully loopable"},{"icon":"🚗","text":"Does not interact with phones or vehicles"}]'),
('zozo','ZoZo','["EMF","UV","SpiritBox"]',80,'high','80% threshold — 2nd most aggressive','Verflucht Ouija Board · Slows when you look · rages when you stare','Staring slows it — but stare too long and it rages to Revenant-tier speed.','[{"icon":"👀","text":"Slows when you look at it — rage state if you stare too long"},{"icon":"😡","text":"Rage state: Revenant-tier speed for ~10 seconds"},{"icon":"📋","text":"50% chance Spirit Board turns red and spells ZoZo"},{"icon":"🚫","text":"Cannot perform Crying or Singing Events"}]');