-- Migration: 019_create_system_settings_table.up.sql
-- Create a system_settings table to store key-value settings such as maintenance mode
CREATE TABLE IF NOT EXISTS system_settings (
  key TEXT PRIMARY KEY,
  value JSONB NOT NULL,
  updated_at TIMESTAMP WITH TIME ZONE DEFAULT now()
);

-- Add an index on updated_at for efficient queries
CREATE INDEX IF NOT EXISTS idx_system_settings_updated_at ON system_settings(updated_at DESC);
