Files
RustProxy/migrations/0010_dashboard_presets.sql
T
2026-10-16 13:02:53 +02:00

11 lines
565 B
SQL

-- Named, administrator-scoped Overview presets. Keep this separate from the
-- existing 4096-byte appearance preferences document and proxy configuration.
CREATE TABLE IF NOT EXISTS dashboard_presets (
administrator_id INTEGER NOT NULL CHECK (administrator_id = 1),
name TEXT NOT NULL CHECK (length(name) BETWEEN 1 AND 64),
document TEXT NOT NULL CHECK (length(document) BETWEEN 2 AND 8192),
updated_at INTEGER NOT NULL,
PRIMARY KEY (administrator_id, name),
FOREIGN KEY (administrator_id) REFERENCES administrator(id) ON DELETE CASCADE
);