All blocks

Platform

Data API grants

Writes the complete Data API privileges of the tables and functions in the `expose` config for anon, authenticated and service_role, or derives table grants from the policies. Supabase no longer grants new tables to the Data API roles automatically.

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

export default defineConfig({
  sql: {
    modules: {
      // Modes: "managed". The default is "managed".
      grants: { mode: "managed" },
    },
  },
});