CREATE TABLE IF NOT EXISTS system_settings (
  setting_key text PRIMARY KEY,
  value jsonb NOT NULL DEFAULT '{}'::jsonb,
  created_at timestamptz NOT NULL DEFAULT now(),
  updated_at timestamptz NOT NULL DEFAULT now()
);

INSERT INTO system_settings (setting_key, value)
VALUES (
  'file_storage',
  '{"resultUploadPolicy": "default"}'::jsonb
)
ON CONFLICT (setting_key) DO NOTHING;
