-- Single-row platform configuration (OpenAI credentials for AI replies).
CREATE TABLE IF NOT EXISTS platform_settings (
  id               TEXT PRIMARY KEY,
  openai_api_key   TEXT,
  openai_base_url  TEXT,
  updated_at       TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

INSERT INTO platform_settings (id) VALUES ('default')
ON CONFLICT (id) DO NOTHING;
