Files
OverCooked-Installer/000027_site_brand_settings.up.sql
T

18 lines
910 B
SQL

CREATE TABLE site_brand_settings (
singleton boolean PRIMARY KEY DEFAULT true CHECK (singleton),
server_name text NOT NULL DEFAULT 'OverCooked' CHECK (char_length(btrim(server_name)) BETWEEN 1 AND 80),
emby_display_name text NOT NULL DEFAULT 'OverCooked' CHECK (char_length(btrim(emby_display_name)) BETWEEN 1 AND 80),
icon_data_url text NOT NULL DEFAULT '' CHECK (char_length(icon_data_url) <= 700000),
updated_by uuid REFERENCES users(id) ON DELETE SET NULL,
updated_at timestamptz NOT NULL DEFAULT now()
);
INSERT INTO site_brand_settings(singleton) VALUES(true);
ALTER TABLE telegram_bot_settings
ADD COLUMN official_chat_id bigint NOT NULL DEFAULT 0,
ADD COLUMN official_chat_title text NOT NULL DEFAULT '' CHECK (char_length(official_chat_title) <= 120);
ALTER TABLE telegram_chat_states
ADD COLUMN message_kind text NOT NULL DEFAULT 'text' CHECK (message_kind IN ('text','photo'));