All blocks

Foundation

Settings

Per-user, per-organization and platform-wide settings as key-value jsonb rows. Users read and write their own; organization settings check settings.read and settings.update; platform settings check a platform permission per key. Keys with a JSON Schema in options.schemas get a pg_jsonschema check.

DocsModes:managedcustom
terminal
npx better-supabase sql add settings
better-supabase.config.ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  sql: {
    modules: {
      // Required by settings; sql add installs them too.
      "updated-at": {},
      tenant: {},
      access: {},
      // Modes: "managed", "custom". The default is "managed".
      settings: { mode: "managed" },
    },
  },
});