From 93539426c1fecc170fbd1db78c453ab3b7a5208e Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Thu, 7 May 2026 13:21:23 -0400 Subject: [PATCH 1/6] feat: setup supabase_realtime_admin --- .github/workflows/tests.yml | 67 ++++- compose.dbs.yml | 8 +- compose.tests.yml | 4 +- config/runtime.exs | 2 +- config/test.exs | 2 +- dev/postgres/00-supabase-schema.sql | 2 - dev/postgres/01-realtime-setup.sql | 23 ++ lib/realtime/tenants/migrations.ex | 8 +- ...reate_realtime_admin_and_move_ownership.ex | 9 +- ...cription_check_filters_use_pg_attribute.ex | 69 +++++ ...511170200_setup_supabase_realtime_admin.ex | 73 +++++ priv/repo/dev_seeds.exs | 28 +- priv/repo/seeds.exs | 2 +- .../region_aware_migrations_test.exs | 2 +- test/realtime/api_test.exs | 4 +- test/realtime/database_test.exs | 6 +- .../extensions/cdc_rls/cdc_rls_test.exs | 3 +- .../extensions/cdc_rls/subscriptions_test.exs | 56 ++++ test/realtime/tenants/connect_test.exs | 12 +- .../tenants/janitor/maintenance_task_test.exs | 2 +- test/realtime/tenants/janitor_test.exs | 2 +- .../tenants/replication_connection_test.exs | 4 +- test/realtime/tenants/schema_test.exs | 276 ++++++++++++++++++ test/realtime/tenants_test.exs | 2 +- .../channels/realtime_channel_test.exs | 2 +- .../controllers/tenant_controller_test.exs | 6 +- .../realtime_web/plugs/assign_tenant_test.exs | 2 +- test/realtime_web/plugs/rate_limiter_test.exs | 2 +- test/support/cleanup.ex | 2 +- test/support/containers.ex | 41 ++- test/support/generators.ex | 2 +- test/support/integrations.ex | 5 +- 32 files changed, 654 insertions(+), 74 deletions(-) delete mode 100644 dev/postgres/00-supabase-schema.sql create mode 100644 dev/postgres/01-realtime-setup.sql create mode 100644 lib/realtime/tenants/repo/migrations/20260506120000_subscription_check_filters_use_pg_attribute.ex create mode 100644 lib/realtime/tenants/repo/migrations/20260511170200_setup_supabase_realtime_admin.ex create mode 100644 test/realtime/tenants/schema_test.exs diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 316b1d3b7..079510461 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,9 @@ on: - "assets/**" - "rel/**" - "native/**" + - "dev/**" - "mix.exs" + - "compose.dbs.yml" - "Dockerfile" - "run.sh" - ".github/workflows/tests.yml" @@ -24,12 +26,13 @@ concurrency: env: MIX_ENV: test - POSTGRES_IMAGE: supabase/postgres:17.6.1.074 jobs: - tests: - name: Tests (Partition ${{ matrix.partition }}) + tests-pg17: + name: Tests PG17 (Partition ${{ matrix.partition }}) runs-on: blacksmith-8vcpu-ubuntu-2404 + env: + POSTGRES_IMAGE: supabase/postgres:17.6.1.120 strategy: fail-fast: false matrix: @@ -84,10 +87,64 @@ jobs: name: coverage-partition-${{ matrix.partition }} path: cover/lcov.info + tests-pg15: + name: Tests PG15 (Partition ${{ matrix.partition }}) + runs-on: blacksmith-8vcpu-ubuntu-2404 + env: + POSTGRES_IMAGE: supabase/postgres:15.14.1.113 + strategy: + fail-fast: false + matrix: + partition: [1, 2, 3, 4] + + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Setup elixir + id: beam + uses: erlef/setup-beam@ee09b1e59bb240681c382eb1f0abc6a04af72764 # v1.23.0 + with: + otp-version: 27.x # Define the OTP version [required] + elixir-version: 1.18.x # Define the elixir version [required] + - name: Cache Mix + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + with: + path: | + deps + _build + priv/native + key: ${{ github.workflow }}-${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-${{ hashFiles('**/mix.lock') }} + restore-keys: | + ${{ github.workflow }}-${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}- + + - name: Cache Docker images + uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 + id: docker-cache + with: + path: /tmp/docker-images + key: docker-images-zstd-${{ env.POSTGRES_IMAGE }} + - name: Load Docker images from cache + if: steps.docker-cache.outputs.cache-hit == 'true' + run: zstd -d --stdout /tmp/docker-images/postgres.tar.zst | docker image load + - name: Pull and save Docker images + if: steps.docker-cache.outputs.cache-hit != 'true' + run: | + docker pull ${{ env.POSTGRES_IMAGE }} + mkdir -p /tmp/docker-images + docker image save ${{ env.POSTGRES_IMAGE }} | zstd -T0 -o /tmp/docker-images/postgres.tar.zst + + - name: Install dependencies + run: mix deps.get + - name: Set up Postgres + run: docker compose -f compose.dbs.yml up -d --wait + - name: Start epmd + run: epmd -daemon + - name: Run tests + run: MIX_TEST_PARTITION=${{ matrix.partition }} mix test --partitions 4 + coverage: name: Merge Coverage - needs: tests - if: ${{ needs.tests.result == 'success' }} + needs: tests-pg17 + if: ${{ needs.tests-pg17.result == 'success' }} runs-on: blacksmith-8vcpu-ubuntu-2404 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/compose.dbs.yml b/compose.dbs.yml index 9624f8138..fce81a714 100644 --- a/compose.dbs.yml +++ b/compose.dbs.yml @@ -1,10 +1,10 @@ services: db: - image: supabase/postgres:17.6.1.074 + image: ${POSTGRES_IMAGE:-supabase/postgres:17.6.1.120} ports: - "5432:5432" volumes: - - ./dev/postgres/00-supabase-schema.sql:/docker-entrypoint-initdb.d/00-supabase-schema.sql + - ./dev/postgres/01-realtime-setup.sql:/docker-entrypoint-initdb.d/init-scripts/01-realtime-setup.sql command: postgres -c config_file=/etc/postgresql/postgresql.conf environment: POSTGRES_HOST: /var/run/postgresql @@ -16,9 +16,11 @@ services: retries: 5 tenant_db: - image: supabase/postgres:17.6.1.074 + image: ${POSTGRES_IMAGE:-supabase/postgres:17.6.1.120} ports: - "5433:5432" + volumes: + - ./dev/postgres/01-realtime-setup.sql:/docker-entrypoint-initdb.d/init-scripts/01-realtime-setup.sql command: postgres -c config_file=/etc/postgresql/postgresql.conf environment: POSTGRES_HOST: /var/run/postgresql diff --git a/compose.tests.yml b/compose.tests.yml index 16a01607f..11e9feb95 100644 --- a/compose.tests.yml +++ b/compose.tests.yml @@ -1,12 +1,12 @@ services: # Supabase Realtime service test_db: - image: supabase/postgres:17.6.1.074 + image: supabase/postgres:17.6.1.120 container_name: test-realtime-db ports: - "5532:5432" volumes: - - ./dev/postgres:/docker-entrypoint-initdb.d/ + - ./dev/postgres/01-realtime-setup.sql:/docker-entrypoint-initdb.d/init-scripts/01-realtime-setup.sql command: postgres -c config_file=/etc/postgresql/postgresql.conf environment: POSTGRES_HOST: /var/run/postgresql diff --git a/config/runtime.exs b/config/runtime.exs index 1b3be1a0a..6ac250be5 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -28,7 +28,7 @@ db_replica_host = System.get_env("DB_REPLICA_HOST") db_replica_pool_size = Env.get_integer("DB_REPLICA_POOL_SIZE", 5) db_ssl = Env.get_boolean("DB_SSL", false) db_ssl_ca_cert = System.get_env("DB_SSL_CA_CERT") -db_user = System.get_env("DB_USER", "supabase_admin") +db_user = System.get_env("DB_USER", "supabase_realtime_admin") disable_healthcheck_logging = Env.get_boolean("DISABLE_HEALTHCHECK_LOGGING", false) dns_nodes = System.get_env("DNS_NODES") gen_rpc_compress = Env.get_integer("GEN_RPC_COMPRESS", 0) diff --git a/config/test.exs b/config/test.exs index 63bca7cf6..282f548d4 100644 --- a/config/test.exs +++ b/config/test.exs @@ -15,7 +15,7 @@ for repo <- [ Realtime.Repo.Replica.SanJose ] do config :realtime, repo, - username: "supabase_admin", + username: "supabase_realtime_admin", password: "postgres", database: "realtime_test#{partition}", hostname: "127.0.0.1", diff --git a/dev/postgres/00-supabase-schema.sql b/dev/postgres/00-supabase-schema.sql deleted file mode 100644 index a89221858..000000000 --- a/dev/postgres/00-supabase-schema.sql +++ /dev/null @@ -1,2 +0,0 @@ -create schema if not exists _realtime; -create schema if not exists realtime; diff --git a/dev/postgres/01-realtime-setup.sql b/dev/postgres/01-realtime-setup.sql new file mode 100644 index 000000000..bd0658308 --- /dev/null +++ b/dev/postgres/01-realtime-setup.sql @@ -0,0 +1,23 @@ +-- dev/test + +CREATE SCHEMA IF NOT EXISTS realtime AUTHORIZATION supabase_admin; +CREATE SCHEMA IF NOT EXISTS _realtime; + +DO $$ +BEGIN + IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'supabase_realtime_admin') THEN + CREATE USER supabase_realtime_admin NOINHERIT CREATEROLE LOGIN REPLICATION; + END IF; +END $$; + +ALTER USER supabase_realtime_admin WITH LOGIN REPLICATION PASSWORD 'postgres'; +ALTER USER supabase_realtime_admin SET search_path = public, extensions, realtime; +GRANT CREATE ON DATABASE postgres TO supabase_realtime_admin; +GRANT SET ON PARAMETER log_min_messages TO supabase_realtime_admin; +GRANT anon, authenticated, service_role TO supabase_realtime_admin; +GRANT CREATE, USAGE ON SCHEMA public TO supabase_realtime_admin; +GRANT USAGE ON SCHEMA extensions TO supabase_realtime_admin; +GRANT USAGE ON SCHEMA auth TO supabase_realtime_admin; +GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA auth TO supabase_realtime_admin; +GRANT USAGE ON SCHEMA realtime TO postgres, anon, authenticated, service_role; +GRANT ALL ON SCHEMA realtime TO supabase_realtime_admin WITH GRANT OPTION; diff --git a/lib/realtime/tenants/migrations.ex b/lib/realtime/tenants/migrations.ex index 600962908..0606db316 100644 --- a/lib/realtime/tenants/migrations.ex +++ b/lib/realtime/tenants/migrations.ex @@ -84,7 +84,9 @@ defmodule Realtime.Tenants.Migrations do AddActionToSubscriptions, FilterActionPostgresChanges, FixByteaDoubleEncodingInCast, - ListChangesWithSlotCount + ListChangesWithSlotCount, + SubscriptionCheckFiltersUsePgAttribute, + SetupSupabaseRealtimeAdmin } @migrations [ @@ -156,7 +158,9 @@ defmodule Realtime.Tenants.Migrations do {20_251_120_212_548, AddActionToSubscriptions}, {20_251_120_215_549, FilterActionPostgresChanges}, {20_260_218_120_000, FixByteaDoubleEncodingInCast}, - {20_260_326_120_000, ListChangesWithSlotCount} + {20_260_326_120_000, ListChangesWithSlotCount}, + {20_260_506_120_000, SubscriptionCheckFiltersUsePgAttribute}, + {20_260_511_170_200, SetupSupabaseRealtimeAdmin} ] defstruct [:tenant_external_id, :settings, migrations_ran: 0] diff --git a/lib/realtime/tenants/repo/migrations/20240401105812_create_realtime_admin_and_move_ownership.ex b/lib/realtime/tenants/repo/migrations/20240401105812_create_realtime_admin_and_move_ownership.ex index bc0672472..3104d86c6 100644 --- a/lib/realtime/tenants/repo/migrations/20240401105812_create_realtime_admin_and_move_ownership.ex +++ b/lib/realtime/tenants/repo/migrations/20240401105812_create_realtime_admin_and_move_ownership.ex @@ -30,6 +30,13 @@ defmodule Realtime.Tenants.Migrations.CreateRealtimeAdminAndMoveOwnership do execute("ALTER table realtime.presences OWNER TO supabase_realtime_admin") execute("ALTER function realtime.channel_name() owner to supabase_realtime_admin") - execute("GRANT supabase_realtime_admin TO postgres") + execute(""" + DO $$ + BEGIN + IF (SELECT rolsuper FROM pg_roles WHERE rolname = current_user) THEN + GRANT supabase_realtime_admin TO postgres; + END IF; + END $$; + """) end end diff --git a/lib/realtime/tenants/repo/migrations/20260506120000_subscription_check_filters_use_pg_attribute.ex b/lib/realtime/tenants/repo/migrations/20260506120000_subscription_check_filters_use_pg_attribute.ex new file mode 100644 index 000000000..dab5d06bc --- /dev/null +++ b/lib/realtime/tenants/repo/migrations/20260506120000_subscription_check_filters_use_pg_attribute.ex @@ -0,0 +1,69 @@ +defmodule Realtime.Tenants.Migrations.SubscriptionCheckFiltersUsePgAttribute do + @moduledoc false + + use Ecto.Migration + + def change do + execute(""" + create or replace function realtime.subscription_check_filters() + returns trigger + language plpgsql + as $$ + declare + col_names text[] = coalesce( + array_agg(a.attname order by a.attnum), + '{}'::text[] + ) + from + pg_catalog.pg_attribute a + where + a.attrelid = new.entity + and a.attnum > 0 + and not a.attisdropped + and pg_catalog.has_column_privilege( + (new.claims ->> 'role'), + a.attrelid, + a.attnum, + 'SELECT' + ); + filter realtime.user_defined_filter; + col_type regtype; + + in_val jsonb; + begin + for filter in select * from unnest(new.filters) loop + if not filter.column_name = any(col_names) then + raise exception 'invalid column for filter %', filter.column_name; + end if; + + col_type = ( + select atttypid::regtype + from pg_catalog.pg_attribute + where attrelid = new.entity + and attname = filter.column_name + ); + if col_type is null then + raise exception 'failed to lookup type for column %', filter.column_name; + end if; + + if filter.op = 'in'::realtime.equality_op then + in_val = realtime.cast(filter.value, (col_type::text || '[]')::regtype); + if coalesce(jsonb_array_length(in_val), 0) > 100 then + raise exception 'too many values for `in` filter. Maximum 100'; + end if; + else + perform realtime.cast(filter.value, col_type); + end if; + end loop; + + new.filters = coalesce( + array_agg(f order by f.column_name, f.op, f.value), + '{}' + ) from unnest(new.filters) f; + + return new; + end; + $$; + """) + end +end diff --git a/lib/realtime/tenants/repo/migrations/20260511170200_setup_supabase_realtime_admin.ex b/lib/realtime/tenants/repo/migrations/20260511170200_setup_supabase_realtime_admin.ex new file mode 100644 index 000000000..f1b54d0b1 --- /dev/null +++ b/lib/realtime/tenants/repo/migrations/20260511170200_setup_supabase_realtime_admin.ex @@ -0,0 +1,73 @@ +defmodule Realtime.Tenants.Migrations.SetupSupabaseRealtimeAdmin do + @moduledoc false + + use Ecto.Migration + + def change do + execute(""" + DO $$ + BEGIN + IF (SELECT rolsuper FROM pg_roles WHERE rolname = current_user) THEN + ALTER ROLE supabase_realtime_admin WITH LOGIN REPLICATION; + ALTER ROLE supabase_realtime_admin SET search_path = public, extensions, realtime; + GRANT CREATE ON DATABASE postgres TO supabase_realtime_admin; + GRANT SET ON PARAMETER log_min_messages TO supabase_realtime_admin; + GRANT anon, authenticated, service_role TO supabase_realtime_admin; + GRANT CREATE, USAGE ON SCHEMA public TO supabase_realtime_admin; + GRANT USAGE ON SCHEMA extensions TO supabase_realtime_admin; + GRANT USAGE ON SCHEMA auth TO supabase_realtime_admin; + GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA auth TO supabase_realtime_admin; + GRANT USAGE ON SCHEMA realtime TO postgres, anon, authenticated, service_role; + GRANT ALL ON SCHEMA realtime TO supabase_realtime_admin WITH GRANT OPTION; + END IF; + END $$; + """) + + execute("ALTER TABLE realtime.messages OWNER TO supabase_realtime_admin") + execute("ALTER TABLE realtime.subscription OWNER TO supabase_realtime_admin") + execute("ALTER TYPE realtime.action OWNER TO supabase_realtime_admin") + execute("ALTER TYPE realtime.equality_op OWNER TO supabase_realtime_admin") + execute("ALTER TYPE realtime.user_defined_filter OWNER TO supabase_realtime_admin") + execute("ALTER TYPE realtime.wal_column OWNER TO supabase_realtime_admin") + execute("ALTER TYPE realtime.wal_rls OWNER TO supabase_realtime_admin") + execute("ALTER FUNCTION realtime.apply_rls(jsonb, integer) OWNER TO supabase_realtime_admin") + + execute( + "ALTER FUNCTION realtime.broadcast_changes(text, text, text, text, text, record, record, text) OWNER TO supabase_realtime_admin" + ) + + execute( + "ALTER FUNCTION realtime.build_prepared_statement_sql(text, regclass, realtime.wal_column[]) OWNER TO supabase_realtime_admin" + ) + + execute("ALTER FUNCTION realtime.cast(text, regtype) OWNER TO supabase_realtime_admin") + + execute( + "ALTER FUNCTION realtime.check_equality_op(realtime.equality_op, regtype, text, text) OWNER TO supabase_realtime_admin" + ) + + execute( + "ALTER FUNCTION realtime.is_visible_through_filters(realtime.wal_column[], realtime.user_defined_filter[]) OWNER TO supabase_realtime_admin" + ) + + execute("ALTER FUNCTION realtime.list_changes(name, name, integer, integer) OWNER TO supabase_realtime_admin") + execute("ALTER FUNCTION realtime.quote_wal2json(regclass) OWNER TO supabase_realtime_admin") + execute("ALTER FUNCTION realtime.send(jsonb, text, text, boolean) OWNER TO supabase_realtime_admin") + execute("ALTER FUNCTION realtime.subscription_check_filters() OWNER TO supabase_realtime_admin") + execute("ALTER FUNCTION realtime.to_regrole(text) OWNER TO supabase_realtime_admin") + execute("ALTER FUNCTION realtime.topic() OWNER TO supabase_realtime_admin") + + execute(""" + DO $$ + BEGIN + IF (SELECT rolsuper FROM pg_roles WHERE rolname = current_user) THEN + REVOKE supabase_realtime_admin FROM postgres; + END IF; + END $$; + """) + + execute("REVOKE CREATE ON SCHEMA realtime FROM postgres") + execute("REVOKE ALL ON realtime.schema_migrations FROM anon, authenticated, service_role, postgres") + execute("GRANT USAGE ON SCHEMA realtime TO postgres WITH GRANT OPTION") + end +end diff --git a/priv/repo/dev_seeds.exs b/priv/repo/dev_seeds.exs index a1ca7c05a..5e81c31f7 100644 --- a/priv/repo/dev_seeds.exs +++ b/priv/repo/dev_seeds.exs @@ -5,6 +5,7 @@ alias Realtime.Tenants tenant_name = "realtime-dev" default_db_host = "127.0.0.1" +publication = "supabase_realtime" {:ok, tenant} = Repo.transaction(fn -> @@ -26,7 +27,7 @@ default_db_host = "127.0.0.1" "settings" => %{ "db_name" => System.get_env("DB_NAME", "postgres"), "db_host" => System.get_env("DB_HOST", default_db_host), - "db_user" => System.get_env("DB_USER", "supabase_admin"), + "db_user" => System.get_env("DB_USER", "supabase_realtime_admin"), "db_password" => System.get_env("DB_PASSWORD", "postgres"), "db_port" => System.get_env("DB_PORT", "5433"), "region" => "us-east-1", @@ -43,22 +44,19 @@ default_db_host = "127.0.0.1" end) # Reset Tenant DB -{:ok, settings} = Database.from_tenant(tenant, "realtime_migrations", :stop) -settings = %{settings | max_restarts: 0, ssl: false} -{:ok, tenant_conn} = Database.connect_db(settings) -publication = "supabase_realtime" - -Postgrex.transaction(tenant_conn, fn db_conn -> - Postgrex.query!(db_conn, "DROP SCHEMA IF EXISTS realtime CASCADE", []) - Postgrex.query!(db_conn, "CREATE SCHEMA IF NOT EXISTS realtime", []) +{:ok, settings} = Database.from_tenant(tenant, "realtime_seeds", :stop) +{:ok, admin_conn} = Database.connect_db(%{settings | username: "supabase_admin", max_restarts: 0, ssl: false}) +Postgrex.transaction(admin_conn, fn db_conn -> [ + "drop schema if exists realtime cascade", + "create schema realtime", + "grant usage on schema realtime to postgres, anon, authenticated, service_role", + "grant all on schema realtime to supabase_realtime_admin with grant option", "drop publication if exists #{publication}", - "drop table if exists public.test_tenant;", - "create table public.test_tenant ( id SERIAL PRIMARY KEY, details text );", - "grant all on table public.test_tenant to anon;", - "grant all on table public.test_tenant to supabase_admin;", - "grant all on table public.test_tenant to authenticated;", + "drop table if exists public.test_tenant", + "create table public.test_tenant ( id SERIAL PRIMARY KEY, details text )", + "grant all on table public.test_tenant to anon, authenticated, supabase_realtime_admin", "create publication #{publication} for table public.test_tenant" ] |> Enum.each(&Postgrex.query!(db_conn, &1)) @@ -69,5 +67,3 @@ case Tenants.Migrations.run_migrations(tenant) do :noop -> :ok _ -> raise "Running Migrations failed" end - -Tenants.Migrations.run_migrations(tenant) diff --git a/priv/repo/seeds.exs b/priv/repo/seeds.exs index 95715f77b..3acc8976f 100644 --- a/priv/repo/seeds.exs +++ b/priv/repo/seeds.exs @@ -28,7 +28,7 @@ default_db_host = "host.docker.internal" "settings" => %{ "db_name" => System.get_env("DB_NAME", "postgres"), "db_host" => System.get_env("DB_HOST", default_db_host), - "db_user" => System.get_env("DB_USER", "supabase_admin"), + "db_user" => System.get_env("DB_USER", "supabase_realtime_admin"), "db_password" => System.get_env("DB_PASSWORD", "postgres"), "db_port" => System.get_env("DB_PORT", "5433"), "region" => "us-east-1", diff --git a/test/integration/region_aware_migrations_test.exs b/test/integration/region_aware_migrations_test.exs index cc3f38051..8f18629ba 100644 --- a/test/integration/region_aware_migrations_test.exs +++ b/test/integration/region_aware_migrations_test.exs @@ -15,7 +15,7 @@ defmodule Realtime.Integration.RegionAwareMigrationsTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "db_port" => "#{port}", "poll_interval" => 100, diff --git a/test/realtime/api_test.exs b/test/realtime/api_test.exs index 508da06fb..0f3776676 100644 --- a/test/realtime/api_test.exs +++ b/test/realtime/api_test.exs @@ -239,7 +239,7 @@ defmodule Realtime.ApiTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "db_port" => "5432", "poll_interval" => 100, @@ -353,7 +353,7 @@ defmodule Realtime.ApiTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "db_port" => "1234", "poll_interval" => 100, diff --git a/test/realtime/database_test.exs b/test/realtime/database_test.exs index 39dceab91..ec10c2fde 100644 --- a/test/realtime/database_test.exs +++ b/test/realtime/database_test.exs @@ -24,7 +24,7 @@ defmodule Realtime.DatabaseTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "region" => "us-east-1", "ssl_enforced" => false, @@ -111,7 +111,7 @@ defmodule Realtime.DatabaseTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "region" => "us-east-1", "ssl_enforced" => false, @@ -293,7 +293,7 @@ defmodule Realtime.DatabaseTest do hostname: "127.0.0.1", port: ^port, database: "postgres", - username: "supabase_admin", + username: "supabase_realtime_admin", password: "postgres", pool_size: 1, queue_target: 5000, diff --git a/test/realtime/extensions/cdc_rls/cdc_rls_test.exs b/test/realtime/extensions/cdc_rls/cdc_rls_test.exs index 1f4698918..372358c55 100644 --- a/test/realtime/extensions/cdc_rls/cdc_rls_test.exs +++ b/test/realtime/extensions/cdc_rls/cdc_rls_test.exs @@ -100,7 +100,8 @@ defmodule Realtime.Extensions.CdcRlsTest do %{oids: oids2} = :sys.get_state(subscriber_manager_pid) assert !Map.equal?(oids, oids2) - Postgrex.query!(conn, "create publication supabase_realtime_test for all tables", []) + # `for all tables` requires superuser + Postgrex.query!(conn, "create publication supabase_realtime_test for table public.test", []) send(subscriber_manager_pid, :check_oids) %{oids: oids3} = :sys.get_state(subscriber_manager_pid) assert !Map.equal?(oids2, oids3) diff --git a/test/realtime/extensions/cdc_rls/subscriptions_test.exs b/test/realtime/extensions/cdc_rls/subscriptions_test.exs index 0db9c67e7..4578b3ef0 100644 --- a/test/realtime/extensions/cdc_rls/subscriptions_test.exs +++ b/test/realtime/extensions/cdc_rls/subscriptions_test.exs @@ -38,6 +38,62 @@ defmodule Realtime.Extensions.PostgresCdcRls.SubscriptionsTest do Postgrex.query!(conn, "select filters, action_filter from realtime.subscription", []) end + test "create with filter on valid column succeeds", %{conn: conn} do + {:ok, subscription_params} = + Subscriptions.parse_subscription_params(%{ + "schema" => "public", + "table" => "test", + "filter" => "id=eq.123" + }) + + params_list = [%{claims: %{"role" => "anon"}, id: UUID.uuid1(), subscription_params: subscription_params}] + + assert {:ok, [%Postgrex.Result{}]} = + Subscriptions.create(conn, "supabase_realtime_test", params_list, self(), self()) + + assert %Postgrex.Result{ + rows: [ + [ + "test", + [{"id", "eq", "123"}], + "*" + ] + ] + } = + Postgrex.query!( + conn, + "select entity::text, filters, action_filter from realtime.subscription", + [] + ) + end + + test "subscription works when role lacks usage permission", %{conn: conn, tenant: tenant} do + {:ok, admin_settings} = Database.from_tenant(tenant, "realtime_test", :stop) + + {:ok, admin_conn} = + Postgrex.start_link( + hostname: admin_settings.hostname, + port: admin_settings.port, + database: admin_settings.database, + username: "supabase_admin", + password: admin_settings.password + ) + + Postgrex.query!(admin_conn, "REVOKE USAGE ON SCHEMA vault FROM supabase_realtime_admin", []) + + {:ok, subscription_params} = + Subscriptions.parse_subscription_params(%{ + "schema" => "public", + "table" => "test", + "filter" => "id=eq.1" + }) + + params_list = [%{claims: %{"role" => "anon"}, id: UUID.uuid1(), subscription_params: subscription_params}] + + assert {:ok, [%Postgrex.Result{}]} = + Subscriptions.create(conn, "supabase_realtime_test", params_list, self(), self()) + end + test "create all tables & all events on INSERT", %{conn: conn} do {:ok, subscription_params} = Subscriptions.parse_subscription_params(%{"event" => "INSERT", "schema" => "public"}) params_list = [%{claims: %{"role" => "anon"}, id: UUID.uuid1(), subscription_params: subscription_params}] diff --git a/test/realtime/tenants/connect_test.exs b/test/realtime/tenants/connect_test.exs index 92125b9e1..7a1413fe4 100644 --- a/test/realtime/tenants/connect_test.exs +++ b/test/realtime/tenants/connect_test.exs @@ -150,7 +150,7 @@ defmodule Realtime.Tenants.ConnectTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "poll_interval" => 100, "poll_max_changes" => 100, @@ -359,7 +359,7 @@ defmodule Realtime.Tenants.ConnectTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "poll_interval" => 100, "poll_max_changes" => 100, @@ -385,7 +385,7 @@ defmodule Realtime.Tenants.ConnectTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "poll_interval" => 100, "poll_max_changes" => 100, @@ -545,7 +545,7 @@ defmodule Realtime.Tenants.ConnectTest do replication_slot_opts = %PostgresReplication{ connection_opts: opts, - table: :all, + table: "test", output_plugin: "pgoutput", output_plugin_options: [proto_version: "1", publication_names: "test_#{i}_publication"], handler_module: Replication.TestHandler, @@ -592,7 +592,7 @@ defmodule Realtime.Tenants.ConnectTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "poll_interval" => 100, "poll_max_changes" => 100, @@ -640,7 +640,7 @@ defmodule Realtime.Tenants.ConnectTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "poll_interval" => 100, "poll_max_changes" => 100, diff --git a/test/realtime/tenants/janitor/maintenance_task_test.exs b/test/realtime/tenants/janitor/maintenance_task_test.exs index 5d4aea474..f61b9b90a 100644 --- a/test/realtime/tenants/janitor/maintenance_task_test.exs +++ b/test/realtime/tenants/janitor/maintenance_task_test.exs @@ -54,7 +54,7 @@ defmodule Realtime.Tenants.Janitor.MaintenanceTaskTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "db_port" => "11111", "poll_interval" => 100, diff --git a/test/realtime/tenants/janitor_test.exs b/test/realtime/tenants/janitor_test.exs index aa32b86f8..7ead28e97 100644 --- a/test/realtime/tenants/janitor_test.exs +++ b/test/realtime/tenants/janitor_test.exs @@ -142,7 +142,7 @@ defmodule Realtime.Tenants.JanitorTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "db_port" => "1111", "poll_interval" => 100, diff --git a/test/realtime/tenants/replication_connection_test.exs b/test/realtime/tenants/replication_connection_test.exs index ad128bdea..6faa04084 100644 --- a/test/realtime/tenants/replication_connection_test.exs +++ b/test/realtime/tenants/replication_connection_test.exs @@ -84,7 +84,7 @@ defmodule Realtime.Tenants.ReplicationConnectionTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "db_port" => "9001", "poll_interval" => 100, @@ -554,7 +554,7 @@ defmodule Realtime.Tenants.ReplicationConnectionTest do replication_slot_opts = %PostgresReplication{ connection_opts: opts, - table: :all, + table: "test", output_plugin: "pgoutput", output_plugin_options: [proto_version: "1", publication_names: "test_#{i}_publication"], handler_module: Replication.TestHandler, diff --git a/test/realtime/tenants/schema_test.exs b/test/realtime/tenants/schema_test.exs new file mode 100644 index 000000000..324ae7303 --- /dev/null +++ b/test/realtime/tenants/schema_test.exs @@ -0,0 +1,276 @@ +defmodule Realtime.Tenants.SchemaTest do + @moduledoc false + + use Realtime.DataCase, async: false + alias Realtime.Database + + setup do + tenant = Containers.checkout_tenant(run_migrations: true) + {:ok, settings} = Database.from_tenant(tenant, "realtime_test", :stop) + + # simulate postgres dashboard role + {:ok, conn} = + settings + |> Map.from_struct() + |> Keyword.new() + |> Keyword.put(:username, "postgres") + |> Postgrex.start_link() + + on_exit(fn -> if Process.alive?(conn), do: GenServer.stop(conn) end) + + %{conn: conn, settings: settings} + end + + describe "restrictions" do + test "deny create trigger on realtime.messages", %{conn: conn} do + Postgrex.query!( + conn, + "CREATE OR REPLACE FUNCTION public.dummy_function() RETURNS trigger AS $$ BEGIN RETURN NEW; END; $$ LANGUAGE plpgsql", + [] + ) + + assert {:error, %Postgrex.Error{postgres: %{code: :insufficient_privilege}}} = + Postgrex.query( + conn, + "CREATE TRIGGER messages_trigger BEFORE INSERT ON realtime.messages FOR EACH ROW EXECUTE FUNCTION public.dummy_function()", + [] + ) + end + + test "deny create trigger on realtime.schema_migrations", %{conn: conn} do + Postgrex.query!( + conn, + "CREATE OR REPLACE FUNCTION public.dummy_function() RETURNS trigger AS $$ BEGIN RETURN NEW; END; $$ LANGUAGE plpgsql", + [] + ) + + assert {:error, %Postgrex.Error{postgres: %{code: :insufficient_privilege}}} = + Postgrex.query( + conn, + "CREATE TRIGGER schema_migrations_trigger BEFORE INSERT ON realtime.schema_migrations FOR EACH ROW EXECUTE FUNCTION public.dummy_function()", + [] + ) + end + + test "deny create trigger on realtime.subscription", %{conn: conn} do + Postgrex.query!( + conn, + """ + CREATE OR REPLACE FUNCTION public.test_function() RETURNS trigger + LANGUAGE plpgsql SECURITY INVOKER AS $$ + BEGIN + RETURN NEW; + END $$ + """, + [] + ) + + assert {:error, %Postgrex.Error{postgres: %{code: :insufficient_privilege}}} = + Postgrex.query( + conn, + "CREATE TRIGGER test_trigger AFTER INSERT OR UPDATE OR DELETE ON realtime.subscription FOR EACH ROW EXECUTE FUNCTION public.test_function()", + [] + ) + end + + test "supabase_realtime_admin cannot grant super to postgres", %{settings: settings} do + {:ok, realtime_conn} = + settings + |> Map.from_struct() + |> Keyword.new() + |> Postgrex.start_link() + + assert {:error, %Postgrex.Error{postgres: %{code: :insufficient_privilege}}} = + Postgrex.query(realtime_conn, "ALTER ROLE postgres WITH SUPERUSER", []) + end + + test "deny alter function owner to postgres", %{conn: conn} do + assert {:error, %Postgrex.Error{postgres: %{code: :insufficient_privilege}}} = + Postgrex.query( + conn, + "ALTER FUNCTION realtime.send(jsonb, text, text, boolean) OWNER TO postgres", + [] + ) + end + + test "deny create on realtime schema", %{conn: conn} do + assert {:error, %Postgrex.Error{postgres: %{code: :insufficient_privilege}}} = + Postgrex.query(conn, "CREATE TABLE realtime.new_table (id int)", []) + end + + test "postgres is not a member of supabase_realtime_admin", %{conn: conn} do + assert %Postgrex.Result{rows: [[false]]} = + Postgrex.query!(conn, "SELECT pg_has_role('postgres', 'supabase_realtime_admin', 'MEMBER')", []) + end + + test "postgres cannot modify realtime.schema_migrations", %{conn: conn} do + assert {:error, %Postgrex.Error{postgres: %{code: :insufficient_privilege}}} = + Postgrex.query( + conn, + "INSERT INTO realtime.schema_migrations (version, inserted_at) VALUES (0, now())", + [] + ) + + assert {:error, %Postgrex.Error{postgres: %{code: :insufficient_privilege}}} = + Postgrex.query(conn, "DELETE FROM realtime.schema_migrations", []) + end + + test "postgres cannot create policy on realtime.schema_migrations", %{conn: conn} do + assert {:error, %Postgrex.Error{postgres: %{code: :insufficient_privilege}}} = + Postgrex.query( + conn, + "CREATE POLICY sm_policy ON realtime.schema_migrations FOR SELECT TO authenticated USING (true)", + [] + ) + end + end + + describe "privileges" do + test "postgres can grant USAGE on schema realtime to a custom role", %{conn: conn} do + Postgrex.query!(conn, "CREATE ROLE role_test", []) + + assert {:ok, _} = Postgrex.query(conn, "GRANT USAGE ON SCHEMA realtime TO role_test", []) + + assert %Postgrex.Result{rows: [[true]]} = + Postgrex.query!(conn, "SELECT has_schema_privilege('role_test', 'realtime', 'USAGE')", []) + + Postgrex.query!(conn, "REVOKE USAGE ON SCHEMA realtime FROM role_test", []) + Postgrex.query!(conn, "DROP ROLE role_test", []) + end + + test "insert into realtime.messages", %{conn: conn} do + assert {:ok, %Postgrex.Result{num_rows: 1}} = + Postgrex.query( + conn, + "INSERT INTO realtime.messages (payload, event, topic, private, extension) VALUES ($1, $2, $3, $4, $5)", + [%{"hello" => "world"}, "test_event", "test_topic", false, "broadcast"] + ) + end + end + + describe "realtime.messages policy grants" do + test "create and drop SELECT policy", %{conn: conn} do + assert {:ok, _} = + Postgrex.query( + conn, + "CREATE POLICY messages_policy_select_test ON realtime.messages FOR SELECT TO authenticated USING (true)", + [] + ) + + assert {:ok, _} = Postgrex.query(conn, "DROP POLICY messages_policy_select_test ON realtime.messages", []) + end + + test "create and drop INSERT policy", %{conn: conn} do + assert {:ok, _} = + Postgrex.query( + conn, + "CREATE POLICY messages_policy_insert_test ON realtime.messages FOR INSERT TO authenticated WITH CHECK (true)", + [] + ) + + assert {:ok, _} = Postgrex.query(conn, "DROP POLICY messages_policy_insert_test ON realtime.messages", []) + end + + test "create and drop FOR ALL policy", %{conn: conn} do + assert {:ok, _} = + Postgrex.query( + conn, + "CREATE POLICY messages_policy ON realtime.messages FOR ALL TO authenticated USING (true) WITH CHECK (true)", + [] + ) + + assert {:ok, _} = Postgrex.query(conn, "DROP POLICY messages_policy ON realtime.messages", []) + end + + test "alter existing policy", %{conn: conn} do + Postgrex.query!( + conn, + "CREATE POLICY messages_policy_alter_test ON realtime.messages FOR SELECT TO authenticated USING (true)", + [] + ) + + assert {:ok, _} = + Postgrex.query( + conn, + "ALTER POLICY messages_policy_alter_test ON realtime.messages USING (auth.role() = 'authenticated')", + [] + ) + + Postgrex.query!(conn, "DROP POLICY messages_policy_alter_test ON realtime.messages", []) + end + end + + describe "realtime.subscription policy grants" do + test "create and drop SELECT policy", %{conn: conn} do + assert {:ok, _} = + Postgrex.query( + conn, + "CREATE POLICY subscription_policy_select ON realtime.subscription FOR SELECT TO authenticated USING (true)", + [] + ) + + assert {:ok, _} = Postgrex.query(conn, "DROP POLICY subscription_policy_select ON realtime.subscription", []) + end + + test "create and drop INSERT policy", %{conn: conn} do + assert {:ok, _} = + Postgrex.query( + conn, + "CREATE POLICY subscription_policy_insert ON realtime.subscription FOR INSERT TO authenticated WITH CHECK (true)", + [] + ) + + assert {:ok, _} = Postgrex.query(conn, "DROP POLICY subscription_policy_insert ON realtime.subscription", []) + end + + test "create and drop UPDATE policy", %{conn: conn} do + assert {:ok, _} = + Postgrex.query( + conn, + "CREATE POLICY subscription_policy_update ON realtime.subscription FOR UPDATE TO authenticated USING (true)", + [] + ) + + assert {:ok, _} = Postgrex.query(conn, "DROP POLICY subscription_policy_update ON realtime.subscription", []) + end + + test "create and drop DELETE policy", %{conn: conn} do + assert {:ok, _} = + Postgrex.query( + conn, + "CREATE POLICY subscription_policy_delete ON realtime.subscription FOR DELETE TO authenticated USING (true)", + [] + ) + + assert {:ok, _} = Postgrex.query(conn, "DROP POLICY subscription_policy_delete ON realtime.subscription", []) + end + + test "create and drop FOR ALL policy", %{conn: conn} do + assert {:ok, _} = + Postgrex.query( + conn, + "CREATE POLICY subscription_policy_all ON realtime.subscription FOR ALL TO authenticated USING (true) WITH CHECK (true)", + [] + ) + + assert {:ok, _} = Postgrex.query(conn, "DROP POLICY subscription_policy_all ON realtime.subscription", []) + end + + test "alter existing policy", %{conn: conn} do + Postgrex.query!( + conn, + "CREATE POLICY subscription_policy_alter_test ON realtime.subscription FOR SELECT TO authenticated USING (true)", + [] + ) + + assert {:ok, _} = + Postgrex.query( + conn, + "ALTER POLICY subscription_policy_alter_test ON realtime.subscription USING (auth.role() = 'authenticated')", + [] + ) + + Postgrex.query!(conn, "DROP POLICY subscription_policy_alter_test ON realtime.subscription", []) + end + end +end diff --git a/test/realtime/tenants_test.exs b/test/realtime/tenants_test.exs index 35f2fd137..9e7a1a9d1 100644 --- a/test/realtime/tenants_test.exs +++ b/test/realtime/tenants_test.exs @@ -58,7 +58,7 @@ defmodule Realtime.TenantsTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "db_port" => "#{port()}", "poll_interval" => 100, diff --git a/test/realtime_web/channels/realtime_channel_test.exs b/test/realtime_web/channels/realtime_channel_test.exs index 78f622aa2..815485c70 100644 --- a/test/realtime_web/channels/realtime_channel_test.exs +++ b/test/realtime_web/channels/realtime_channel_test.exs @@ -1473,7 +1473,7 @@ defmodule RealtimeWeb.RealtimeChannelTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "poll_interval" => 100, "poll_max_changes" => 100, diff --git a/test/realtime_web/controllers/tenant_controller_test.exs b/test/realtime_web/controllers/tenant_controller_test.exs index 89fe010f7..49fa73996 100644 --- a/test/realtime_web/controllers/tenant_controller_test.exs +++ b/test/realtime_web/controllers/tenant_controller_test.exs @@ -90,7 +90,7 @@ defmodule RealtimeWeb.TenantControllerTest do assert Crypto.encrypt!("127.0.0.1") == settings["db_host"] assert Crypto.encrypt!("postgres") == settings["db_name"] - assert Crypto.encrypt!("supabase_admin") == settings["db_user"] + assert Crypto.encrypt!("supabase_realtime_admin") == settings["db_user"] refute settings["db_password"] Process.sleep(100) @@ -119,7 +119,7 @@ defmodule RealtimeWeb.TenantControllerTest do assert Crypto.encrypt!("127.0.0.1") == settings["db_host"] assert Crypto.encrypt!("postgres") == settings["db_name"] - assert Crypto.encrypt!("supabase_admin") == settings["db_user"] + assert Crypto.encrypt!("supabase_realtime_admin") == settings["db_user"] refute settings["db_password"] Process.sleep(100) %{extensions: [%{settings: settings}]} = tenant = Tenants.get_tenant_by_external_id(external_id) @@ -660,7 +660,7 @@ defmodule RealtimeWeb.TenantControllerTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "db_port" => "#{port}", "poll_interval" => 100, diff --git a/test/realtime_web/plugs/assign_tenant_test.exs b/test/realtime_web/plugs/assign_tenant_test.exs index 536d7a548..102c8c6a1 100644 --- a/test/realtime_web/plugs/assign_tenant_test.exs +++ b/test/realtime_web/plugs/assign_tenant_test.exs @@ -15,7 +15,7 @@ defmodule RealtimeWeb.Plugs.AssignTenantTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "db_port" => "6432", "poll_interval" => 100, diff --git a/test/realtime_web/plugs/rate_limiter_test.exs b/test/realtime_web/plugs/rate_limiter_test.exs index d79aef969..7fd270a66 100644 --- a/test/realtime_web/plugs/rate_limiter_test.exs +++ b/test/realtime_web/plugs/rate_limiter_test.exs @@ -13,7 +13,7 @@ defmodule RealtimeWeb.Plugs.RateLimiterTest do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "db_port" => "6432", "poll_interval" => 100, diff --git a/test/support/cleanup.ex b/test/support/cleanup.ex index 12954698c..161eb58de 100644 --- a/test/support/cleanup.ex +++ b/test/support/cleanup.ex @@ -10,7 +10,7 @@ defmodule Cleanup do hostname: "localhost", port: 5433, database: "postgres", - username: "supabase_admin", + username: "supabase_realtime_admin", password: "postgres" ) diff --git a/test/support/containers.ex b/test/support/containers.ex index 4ff98a905..22cb17e83 100644 --- a/test/support/containers.ex +++ b/test/support/containers.ex @@ -7,16 +7,19 @@ defmodule Containers do use GenServer - @image "supabase/postgres:17.6.1.074" + @setup_init Path.expand("../../dev/postgres/01-realtime-setup.sql", __DIR__) + + defp image, do: System.get_env("POSTGRES_IMAGE", "supabase/postgres:17.6.1.120") + # Pull image if not available def pull do - case System.cmd("docker", ["image", "inspect", @image]) do + case System.cmd("docker", ["image", "inspect", image()]) do {_, 0} -> :ok _ -> - IO.puts("Pulling image #{@image}. This might take a while...") - {_, 0} = System.cmd("docker", ["pull", @image]) + IO.puts("Pulling image #{image()}. This might take a while...") + {_, 0} = System.cmd("docker", ["pull", image()]) end end @@ -152,11 +155,7 @@ defmodule Containers do {:ok, conn} = Database.connect_db(settings) try do - Postgrex.transaction(conn, fn db_conn -> - Postgrex.query!(db_conn, "DROP SCHEMA IF EXISTS realtime CASCADE", []) - Postgrex.query!(db_conn, "CREATE SCHEMA IF NOT EXISTS realtime", []) - end) - + reset_realtime_schema!(settings) storage_up!(tenant) RateCounterHelper.stop(tenant.external_id) @@ -212,11 +211,27 @@ defmodule Containers do defp repo_run(:unboxed, fun), do: Ecto.Adapters.SQL.Sandbox.unboxed_run(Realtime.Repo, fun) defp repo_run(:sandbox, fun), do: fun.() + defp reset_realtime_schema!(settings) do + {:ok, admin_conn} = + Postgrex.start_link( + hostname: settings.hostname, + port: settings.port, + database: settings.database, + username: "supabase_admin", + password: settings.password + ) + + Postgrex.query!(admin_conn, "DROP PUBLICATION IF EXISTS supabase_realtime_test", []) + Postgrex.query!(admin_conn, "DROP SCHEMA IF EXISTS realtime CASCADE", []) + Postgrex.query!(admin_conn, "CREATE SCHEMA realtime", []) + Postgrex.query!(admin_conn, "GRANT USAGE ON SCHEMA realtime TO postgres, anon, authenticated, service_role", []) + Postgrex.query!(admin_conn, "GRANT ALL ON SCHEMA realtime TO supabase_realtime_admin WITH GRANT OPTION", []) + end + def stop_containers() do {list, 0} = System.cmd("docker", ["ps", "-a", "--format", "{{.Names}}", "--filter", "name=realtime-test-*"]) - names = list |> String.trim() |> String.split("\n") - for name <- names do + for name <- String.split(list, "\n", trim: true) do System.cmd("docker", ["rm", "-f", name]) end end @@ -304,7 +319,9 @@ defmodule Containers do "POSTGRES_PASSWORD=postgres", "-p", "#{port}:5432", - @image, + "-v", + "#{@setup_init}:/docker-entrypoint-initdb.d/init-scripts/01-realtime-setup.sql", + image(), "postgres", "-c", "config_file=/etc/postgresql/postgresql.conf", diff --git a/test/support/generators.ex b/test/support/generators.ex index df73b90a2..ebafe378d 100644 --- a/test/support/generators.ex +++ b/test/support/generators.ex @@ -20,7 +20,7 @@ defmodule Generators do "settings" => %{ "db_host" => "127.0.0.1", "db_name" => "postgres", - "db_user" => "supabase_admin", + "db_user" => "supabase_realtime_admin", "db_password" => "postgres", "db_port" => "#{override[:port] || port()}", "poll_interval_ms" => 10, diff --git a/test/support/integrations.ex b/test/support/integrations.ex index b8150497f..8ed2bc06d 100644 --- a/test/support/integrations.ex +++ b/test/support/integrations.ex @@ -79,9 +79,10 @@ defmodule Integrations do primary key ("id")); """, "grant all on table public.test to anon;", - "grant all on table public.test to supabase_admin;", + "grant all on table public.test to supabase_realtime_admin;", "grant all on table public.test to authenticated;", - "create publication #{publication} for all tables", + # `for all tables` requires superuser + "create publication #{publication} for table public.test", """ DO $$ DECLARE From 2ce3d1b492f58d9e08a81d0928a287863f9660d0 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Fri, 15 May 2026 10:24:24 -0400 Subject: [PATCH 2/6] use supabase_realtime_admin in compose.tests too --- compose.tests.yml | 2 +- dev/postgres/01-realtime-setup.sql | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compose.tests.yml b/compose.tests.yml index 11e9feb95..f758195e0 100644 --- a/compose.tests.yml +++ b/compose.tests.yml @@ -29,7 +29,7 @@ services: PORT: 4100 DB_HOST: host.docker.internal DB_PORT: 5532 - DB_USER: supabase_admin + DB_USER: supabase_realtime_admin DB_PASSWORD: postgres DB_NAME: postgres DB_ENC_KEY: 1234567890123456 diff --git a/dev/postgres/01-realtime-setup.sql b/dev/postgres/01-realtime-setup.sql index bd0658308..c3ed516c4 100644 --- a/dev/postgres/01-realtime-setup.sql +++ b/dev/postgres/01-realtime-setup.sql @@ -21,3 +21,4 @@ GRANT USAGE ON SCHEMA auth TO supabase_realtime_admin; GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA auth TO supabase_realtime_admin; GRANT USAGE ON SCHEMA realtime TO postgres, anon, authenticated, service_role; GRANT ALL ON SCHEMA realtime TO supabase_realtime_admin WITH GRANT OPTION; +GRANT CREATE, USAGE ON SCHEMA _realtime TO supabase_realtime_admin; From 5c2c82f7cc59c5081dd6cad3c4cf7e68b871e888 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Mon, 18 May 2026 10:23:22 -0400 Subject: [PATCH 3/6] fixes and cleanup --- ...511170200_setup_supabase_realtime_admin.ex | 2 +- test/realtime/tenants/schema_test.exs | 57 +++++++++++++------ 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/lib/realtime/tenants/repo/migrations/20260511170200_setup_supabase_realtime_admin.ex b/lib/realtime/tenants/repo/migrations/20260511170200_setup_supabase_realtime_admin.ex index f1b54d0b1..b109a5dd7 100644 --- a/lib/realtime/tenants/repo/migrations/20260511170200_setup_supabase_realtime_admin.ex +++ b/lib/realtime/tenants/repo/migrations/20260511170200_setup_supabase_realtime_admin.ex @@ -8,7 +8,7 @@ defmodule Realtime.Tenants.Migrations.SetupSupabaseRealtimeAdmin do DO $$ BEGIN IF (SELECT rolsuper FROM pg_roles WHERE rolname = current_user) THEN - ALTER ROLE supabase_realtime_admin WITH LOGIN REPLICATION; + ALTER ROLE supabase_realtime_admin WITH NOINHERIT CREATEROLE LOGIN REPLICATION; ALTER ROLE supabase_realtime_admin SET search_path = public, extensions, realtime; GRANT CREATE ON DATABASE postgres TO supabase_realtime_admin; GRANT SET ON PARAMETER log_min_messages TO supabase_realtime_admin; diff --git a/test/realtime/tenants/schema_test.exs b/test/realtime/tenants/schema_test.exs index 324ae7303..9488c99bc 100644 --- a/test/realtime/tenants/schema_test.exs +++ b/test/realtime/tenants/schema_test.exs @@ -8,17 +8,13 @@ defmodule Realtime.Tenants.SchemaTest do tenant = Containers.checkout_tenant(run_migrations: true) {:ok, settings} = Database.from_tenant(tenant, "realtime_test", :stop) - # simulate postgres dashboard role - {:ok, conn} = - settings - |> Map.from_struct() - |> Keyword.new() - |> Keyword.put(:username, "postgres") - |> Postgrex.start_link() + opts = settings |> Map.from_struct() |> Keyword.new() - on_exit(fn -> if Process.alive?(conn), do: GenServer.stop(conn) end) + # simulate postgres dashboard role + {:ok, conn} = opts |> Keyword.put(:username, "postgres") |> Postgrex.start_link() + {:ok, realtime_conn} = Postgrex.start_link(opts) - %{conn: conn, settings: settings} + %{conn: conn, realtime_conn: realtime_conn, settings: settings} end describe "restrictions" do @@ -73,13 +69,7 @@ defmodule Realtime.Tenants.SchemaTest do ) end - test "supabase_realtime_admin cannot grant super to postgres", %{settings: settings} do - {:ok, realtime_conn} = - settings - |> Map.from_struct() - |> Keyword.new() - |> Postgrex.start_link() - + test "supabase_realtime_admin cannot grant super to postgres", %{realtime_conn: realtime_conn} do assert {:error, %Postgrex.Error{postgres: %{code: :insufficient_privilege}}} = Postgrex.query(realtime_conn, "ALTER ROLE postgres WITH SUPERUSER", []) end @@ -138,6 +128,41 @@ defmodule Realtime.Tenants.SchemaTest do Postgrex.query!(conn, "DROP ROLE role_test", []) end + test "supabase_realtime_admin can create a role", %{realtime_conn: realtime_conn} do + role = "role_realtime_admin_create_#{System.unique_integer([:positive])}" + + assert {:ok, _} = Postgrex.query(realtime_conn, "CREATE ROLE #{role}", []) + + assert %Postgrex.Result{rows: [[true]]} = + Postgrex.query!(realtime_conn, "SELECT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = $1)", [role]) + end + + test "supabase_realtime_admin has NOINHERIT", %{realtime_conn: realtime_conn} do + assert %Postgrex.Result{rows: [[false]]} = + Postgrex.query!( + realtime_conn, + "SELECT rolinherit FROM pg_roles WHERE rolname = 'supabase_realtime_admin'", + [] + ) + end + + test "supabase_realtime_admin can SET ROLE to granted roles", %{realtime_conn: realtime_conn} do + for role <- ~w(anon authenticated service_role) do + assert {:ok, _} = Postgrex.query(realtime_conn, "SET ROLE #{role}", []) + Postgrex.query!(realtime_conn, "RESET ROLE", []) + end + end + + test "supabase_realtime_admin can drop a role", %{realtime_conn: realtime_conn} do + role = "role_realtime_admin_drop_#{System.unique_integer([:positive])}" + Postgrex.query!(realtime_conn, "CREATE ROLE #{role}", []) + + assert {:ok, _} = Postgrex.query(realtime_conn, "DROP ROLE #{role}", []) + + assert %Postgrex.Result{rows: [[false]]} = + Postgrex.query!(realtime_conn, "SELECT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = $1)", [role]) + end + test "insert into realtime.messages", %{conn: conn} do assert {:ok, %Postgrex.Result{num_rows: 1}} = Postgrex.query( From 96d353dc8e279852f3459e638898b6ecf307e380 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Tue, 19 May 2026 16:44:24 -0400 Subject: [PATCH 4/6] feature flag: use_supabase_realtime_admin --- lib/realtime/tenants.ex | 9 ++++- lib/realtime/tenants/migrations.ex | 23 +++++++++++-- test/realtime/tenants/migrations_test.exs | 40 ++++++++++++++++++++++- test/realtime/tenants_test.exs | 3 +- 4 files changed, 69 insertions(+), 6 deletions(-) diff --git a/lib/realtime/tenants.ex b/lib/realtime/tenants.ex index 90f236297..158887570 100644 --- a/lib/realtime/tenants.ex +++ b/lib/realtime/tenants.ex @@ -476,7 +476,14 @@ defmodule Realtime.Tenants do Checks if migrations for a given tenant need to run. """ @spec run_migrations?(Tenant.t() | integer()) :: boolean() - def run_migrations?(%Tenant{} = tenant), do: run_migrations?(tenant.migrations_ran) + def run_migrations?(%Tenant{} = tenant) do + available_migrations = + tenant.external_id + |> Migrations.migrations() + |> Enum.count() + + tenant.migrations_ran < available_migrations + end def run_migrations?(migrations_ran) when is_integer(migrations_ran), do: migrations_ran < Enum.count(Migrations.migrations()) diff --git a/lib/realtime/tenants/migrations.ex b/lib/realtime/tenants/migrations.ex index 4ce7dd0d3..25a5e75c6 100644 --- a/lib/realtime/tenants/migrations.ex +++ b/lib/realtime/tenants/migrations.ex @@ -7,6 +7,7 @@ defmodule Realtime.Tenants.Migrations do alias Realtime.Tenants alias Realtime.Database + alias Realtime.FeatureFlags alias Realtime.Registry.Unique alias Realtime.Repo alias Realtime.Api.Tenant @@ -220,7 +221,7 @@ defmodule Realtime.Tenants.Migrations do :ok -> Task.Supervisor.async_nolink(__MODULE__.TaskSupervisor, Api, :update_migrations_ran, [ tenant_external_id, - Enum.count(@migrations) + Enum.count(migrations(tenant_external_id)) ]) :ignore @@ -253,7 +254,7 @@ defmodule Realtime.Tenants.Migrations do try do opts = [all: true, prefix: "realtime", dynamic_repo: repo] - result = Ecto.Migrator.run(Repo, @migrations, :up, opts) + result = Ecto.Migrator.run(Repo, migrations(tenant_external_id), :up, opts) Telemetry.stop(event, start_time, Map.put(metadata, :migrations_executed, length(result))) rescue error -> @@ -313,5 +314,21 @@ defmodule Realtime.Tenants.Migrations do :ok end - def migrations(), do: @migrations + @doc """ + Returns the migrations to run. + """ + @spec migrations(String.t() | nil) :: [{pos_integer(), module()}] + def migrations(tenant_external_id \\ nil) do + Enum.filter(@migrations, fn {_version, module} -> migration_enabled?(module, tenant_external_id) end) + end + + defp migration_enabled?(SetupSupabaseRealtimeAdmin, nil = _tenant_external_id) do + FeatureFlags.enabled?("use_supabase_realtime_admin") + end + + defp migration_enabled?(SetupSupabaseRealtimeAdmin, tenant_external_id) when is_binary(tenant_external_id) do + FeatureFlags.enabled?("use_supabase_realtime_admin", tenant_external_id) + end + + defp migration_enabled?(_migration, _tenant_external_id), do: true end diff --git a/test/realtime/tenants/migrations_test.exs b/test/realtime/tenants/migrations_test.exs index 8bb887476..100dcad00 100644 --- a/test/realtime/tenants/migrations_test.exs +++ b/test/realtime/tenants/migrations_test.exs @@ -1,11 +1,17 @@ defmodule Realtime.Tenants.MigrationsTest do - alias Realtime.Tenants.Cache # Can't use async: true because Cachex does not work well with Ecto Sandbox use Realtime.DataCase, async: false use Mimic + alias Realtime.Api + alias Realtime.Tenants.Cache alias Realtime.Tenants.Migrations + setup do + Cachex.clear(Realtime.FeatureFlags.Cache) + :ok + end + describe "run_migrations/1" do test "migrations for a given tenant only run once" do tenant = Containers.checkout_tenant() @@ -35,6 +41,38 @@ defmodule Realtime.Tenants.MigrationsTest do end end + describe "migrations/1" do + test "excludes SetupSupabaseRealtimeAdmin by default" do + modules = Enum.map(Migrations.migrations(), fn {_v, m} -> m end) + refute Migrations.SetupSupabaseRealtimeAdmin in modules + end + + test "excludes SetupSupabaseRealtimeAdmin by default with tenant" do + tenant = Containers.checkout_tenant() + modules = Enum.map(Migrations.migrations(tenant.external_id), fn {_v, m} -> m end) + refute Migrations.SetupSupabaseRealtimeAdmin in modules + end + + test "includes SetupSupabaseRealtimeAdmin when the feature flag is enabled" do + {:ok, _} = Api.upsert_feature_flag(%{name: "use_supabase_realtime_admin", enabled: true}) + + modules = Enum.map(Migrations.migrations(), fn {_v, m} -> m end) + assert Migrations.SetupSupabaseRealtimeAdmin in modules + end + + test "includes SetupSupabaseRealtimeAdmin when the tenant override is enabled" do + tenant = Containers.checkout_tenant() + {:ok, _} = Api.upsert_feature_flag(%{name: "use_supabase_realtime_admin", enabled: false}) + {:ok, _} = Realtime.FeatureFlags.set_tenant_flag("use_supabase_realtime_admin", tenant.external_id, true) + + Process.sleep(100) + Cache.invalidate_tenant_cache(tenant.external_id) + + modules = Enum.map(Migrations.migrations(tenant.external_id), fn {_v, m} -> m end) + assert Migrations.SetupSupabaseRealtimeAdmin in modules + end + end + describe "telemetry" do setup :set_mimic_global diff --git a/test/realtime/tenants_test.exs b/test/realtime/tenants_test.exs index 9e7a1a9d1..7c585a979 100644 --- a/test/realtime/tenants_test.exs +++ b/test/realtime/tenants_test.exs @@ -37,7 +37,8 @@ defmodule Realtime.TenantsTest do tenant = tenant_fixture(%{migrations_ran: 0}) assert Tenants.run_migrations?(tenant) - tenant = tenant_fixture(%{migrations_ran: Enum.count(Migrations.migrations()) - 1}) + migrations = Enum.count(Migrations.migrations(tenant.external_id)) + tenant = tenant_fixture(%{migrations_ran: migrations - 1}) assert Tenants.run_migrations?(tenant) end From 6ed268cd185a917f11920b52ef9a3ead4456c9f1 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Wed, 20 May 2026 16:49:20 -0400 Subject: [PATCH 5/6] fix tests --- test/realtime/tenants/migrations_test.exs | 12 ++++++++++-- test/support/containers.ex | 6 ++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/test/realtime/tenants/migrations_test.exs b/test/realtime/tenants/migrations_test.exs index 100dcad00..5ecdf81ec 100644 --- a/test/realtime/tenants/migrations_test.exs +++ b/test/realtime/tenants/migrations_test.exs @@ -42,13 +42,21 @@ defmodule Realtime.Tenants.MigrationsTest do end describe "migrations/1" do - test "excludes SetupSupabaseRealtimeAdmin by default" do + test "excludes SetupSupabaseRealtimeAdmin when the feature flag is disabled" do + {:ok, _} = Api.upsert_feature_flag(%{name: "use_supabase_realtime_admin", enabled: false}) + modules = Enum.map(Migrations.migrations(), fn {_v, m} -> m end) refute Migrations.SetupSupabaseRealtimeAdmin in modules end - test "excludes SetupSupabaseRealtimeAdmin by default with tenant" do + test "excludes SetupSupabaseRealtimeAdmin when the tenant override is disabled" do tenant = Containers.checkout_tenant() + {:ok, _} = Api.upsert_feature_flag(%{name: "use_supabase_realtime_admin", enabled: true}) + {:ok, _} = Realtime.FeatureFlags.set_tenant_flag("use_supabase_realtime_admin", tenant.external_id, false) + + Process.sleep(100) + Cache.invalidate_tenant_cache(tenant.external_id) + modules = Enum.map(Migrations.migrations(tenant.external_id), fn {_v, m} -> m end) refute Migrations.SetupSupabaseRealtimeAdmin in modules end diff --git a/test/support/containers.ex b/test/support/containers.ex index 32dfa7fc7..d694b3f57 100644 --- a/test/support/containers.ex +++ b/test/support/containers.ex @@ -148,6 +148,12 @@ defmodule Containers do port <- Container.port(container) do tenant = repo_run(mode, fn -> Generators.tenant_fixture(%{port: port, migrations_ran: 0}) end) + # TODO: REAL-818 - remove when Project Migrations v2 is done + Realtime.FeatureFlags.Cache.update_cache(%Realtime.Api.FeatureFlag{ + name: "use_supabase_realtime_admin", + enabled: true + }) + run_migrations? = Keyword.get(opts, :run_migrations, false) {:ok, settings} = Database.from_tenant(tenant, "realtime_test", :stop) From e171deeb8352375a96d0c34b3d6d6c0bd01e339f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 20:50:43 +0000 Subject: [PATCH 6/6] chore: update tenant_db_baseline.json --- priv/repo/tenant_db_baseline.json | 15147 ++++++++++++++++++---------- 1 file changed, 9871 insertions(+), 5276 deletions(-) diff --git a/priv/repo/tenant_db_baseline.json b/priv/repo/tenant_db_baseline.json index 4540dd443..cd6536693 100644 --- a/priv/repo/tenant_db_baseline.json +++ b/priv/repo/tenant_db_baseline.json @@ -3,2276 +3,5363 @@ "currentUser": "supabase_admin", "aggregates": {}, "collations": {}, - "compositeTypes": {}, - "domains": {}, - "enums": {}, - "extensions": { - "extension:\"uuid-ossp\"": { - "name": "\"uuid-ossp\"", - "schema": "extensions", - "relocatable": true, - "version": "1.1", - "owner": "supabase_admin", - "comment": "generate universally unique identifiers (UUIDs)", - "members": [ - "procedure:extensions.uuid_generate_v1()", - "procedure:extensions.uuid_generate_v1mc()", - "procedure:extensions.uuid_generate_v3(uuid,text)", - "procedure:extensions.uuid_generate_v4()", - "procedure:extensions.uuid_generate_v5(uuid,text)", - "procedure:extensions.uuid_nil()", - "procedure:extensions.uuid_ns_dns()", - "procedure:extensions.uuid_ns_oid()", - "procedure:extensions.uuid_ns_url()", - "procedure:extensions.uuid_ns_x500()" - ] - }, - "extension:pg_graphql": { - "name": "pg_graphql", - "schema": "graphql", - "relocatable": false, - "version": "1.5.11", - "owner": "supabase_admin", - "comment": "pg_graphql: GraphQL support", - "members": [ - "eventTrigger:graphql_watch_ddl", - "eventTrigger:graphql_watch_drop", - "procedure:graphql._internal_resolve(text,jsonb,text,jsonb)", - "procedure:graphql.comment_directive(text)", - "procedure:graphql.exception(text)", - "procedure:graphql.get_schema_version()", - "procedure:graphql.increment_schema_version()", - "procedure:graphql.resolve(text,jsonb,text,jsonb)", - "procedure:graphql_public.graphql(text,text,jsonb,jsonb)", - "sequence:graphql.seq_schema_version" - ] - }, - "extension:pg_stat_statements": { - "name": "pg_stat_statements", - "schema": "extensions", - "relocatable": true, - "version": "1.11", - "owner": "supabase_admin", - "comment": "track planning and execution statistics of all SQL statements executed", - "members": [ - "procedure:extensions.pg_stat_statements(boolean)", - "procedure:extensions.pg_stat_statements_info()", - "procedure:extensions.pg_stat_statements_reset(oid,oid,bigint,boolean)", - "type:extensions._pg_stat_statements", - "type:extensions._pg_stat_statements_info", - "view:extensions.pg_stat_statements", - "view:extensions.pg_stat_statements", - "view:extensions.pg_stat_statements_info", - "view:extensions.pg_stat_statements_info" - ] - }, - "extension:pgcrypto": { - "name": "pgcrypto", - "schema": "extensions", - "relocatable": true, - "version": "1.3", - "owner": "supabase_admin", - "comment": "cryptographic functions", - "members": [ - "procedure:extensions.armor(bytea)", - "procedure:extensions.armor(bytea,text[],text[])", - "procedure:extensions.crypt(text,text)", - "procedure:extensions.dearmor(text)", - "procedure:extensions.decrypt(bytea,bytea,text)", - "procedure:extensions.decrypt_iv(bytea,bytea,bytea,text)", - "procedure:extensions.digest(bytea,text)", - "procedure:extensions.digest(text,text)", - "procedure:extensions.encrypt(bytea,bytea,text)", - "procedure:extensions.encrypt_iv(bytea,bytea,bytea,text)", - "procedure:extensions.gen_random_bytes(integer)", - "procedure:extensions.gen_random_uuid()", - "procedure:extensions.gen_salt(text)", - "procedure:extensions.gen_salt(text,integer)", - "procedure:extensions.hmac(bytea,bytea,text)", - "procedure:extensions.hmac(text,text,text)", - "procedure:extensions.pgp_armor_headers(text)", - "procedure:extensions.pgp_key_id(bytea)", - "procedure:extensions.pgp_pub_decrypt(bytea,bytea)", - "procedure:extensions.pgp_pub_decrypt(bytea,bytea,text)", - "procedure:extensions.pgp_pub_decrypt(bytea,bytea,text,text)", - "procedure:extensions.pgp_pub_decrypt_bytea(bytea,bytea)", - "procedure:extensions.pgp_pub_decrypt_bytea(bytea,bytea,text)", - "procedure:extensions.pgp_pub_decrypt_bytea(bytea,bytea,text,text)", - "procedure:extensions.pgp_pub_encrypt(text,bytea)", - "procedure:extensions.pgp_pub_encrypt(text,bytea,text)", - "procedure:extensions.pgp_pub_encrypt_bytea(bytea,bytea)", - "procedure:extensions.pgp_pub_encrypt_bytea(bytea,bytea,text)", - "procedure:extensions.pgp_sym_decrypt(bytea,text)", - "procedure:extensions.pgp_sym_decrypt(bytea,text,text)", - "procedure:extensions.pgp_sym_decrypt_bytea(bytea,text)", - "procedure:extensions.pgp_sym_decrypt_bytea(bytea,text,text)", - "procedure:extensions.pgp_sym_encrypt(text,text)", - "procedure:extensions.pgp_sym_encrypt(text,text,text)", - "procedure:extensions.pgp_sym_encrypt_bytea(bytea,text)", - "procedure:extensions.pgp_sym_encrypt_bytea(bytea,text,text)" - ] - }, - "extension:plpgsql": { - "name": "plpgsql", - "schema": "pg_catalog", - "relocatable": false, - "version": "1.0", - "owner": "supabase_admin", - "comment": "PL/pgSQL procedural language", - "members": [ - "procedure:pg_catalog.plpgsql_call_handler()", - "procedure:pg_catalog.plpgsql_inline_handler(internal)", - "procedure:pg_catalog.plpgsql_validator(oid)" - ] - }, - "extension:supabase_vault": { - "name": "supabase_vault", - "schema": "vault", - "relocatable": false, - "version": "0.3.1", - "owner": "supabase_admin", - "comment": "Supabase Vault Extension", - "members": [ - "procedure:vault._crypto_aead_det_decrypt(bytea,bytea,bigint,bytea,bytea)", - "procedure:vault._crypto_aead_det_encrypt(bytea,bytea,bigint,bytea,bytea)", - "procedure:vault._crypto_aead_det_noncegen()", - "procedure:vault.create_secret(text,text,text,uuid)", - "procedure:vault.update_secret(uuid,text,text,text,uuid)", - "table:vault.secrets", - "table:vault.secrets", - "type:vault._decrypted_secrets", - "type:vault._secrets", - "view:vault.decrypted_secrets", - "view:vault.decrypted_secrets" - ] - } - }, - "procedures": { - "procedure:auth.email()": { - "schema": "auth", - "name": "email", - "kind": "f", - "return_type": "text", - "return_type_schema": "pg_catalog", - "language": "sql", - "security_definer": false, - "volatility": "s", - "parallel_safety": "u", - "execution_cost": 100, - "result_rows": 0, - "is_strict": false, - "leakproof": false, - "returns_set": false, - "argument_count": 0, - "argument_default_count": 0, - "argument_names": null, - "argument_types": [], - "all_argument_types": [], - "argument_modes": null, - "argument_defaults": null, - "source_code": "\n select nullif(current_setting('request.jwt.claim.email', true), '')::text;\n", - "binary_path": null, - "sql_body": null, - "definition": "CREATE OR REPLACE FUNCTION auth.email()\n RETURNS text\n LANGUAGE sql\n STABLE\nAS $function$\n select nullif(current_setting('request.jwt.claim.email', true), '')::text;\n$function$\n", - "config": null, - "owner": "supabase_auth_admin", + "compositeTypes": { + "type:realtime.user_defined_filter": { + "schema": "realtime", + "name": "user_defined_filter", + "row_security": false, + "force_row_security": false, + "has_indexes": false, + "has_rules": false, + "has_triggers": false, + "has_subclasses": false, + "is_populated": true, + "replica_identity": "n", + "is_partition": false, + "options": null, + "partition_bound": null, + "owner": "supabase_realtime_admin", "comment": null, - "privileges": [ + "columns": [ { - "grantee": "PUBLIC", - "privilege": "EXECUTE", - "grantable": false + "name": "column_name", + "position": 1, + "data_type": "text", + "data_type_str": "text", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null }, { - "grantee": "supabase_auth_admin", - "privilege": "EXECUTE", + "name": "op", + "position": 2, + "data_type": "realtime.equality_op", + "data_type_str": "realtime.equality_op", + "is_custom_type": true, + "custom_type_type": "e", + "custom_type_category": "E", + "custom_type_schema": "realtime", + "custom_type_name": "equality_op", + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null + }, + { + "name": "value", + "position": 3, + "data_type": "text", + "data_type_str": "text", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null + } + ], + "privileges": [ + { + "grantee": "PUBLIC", + "privilege": "USAGE", "grantable": false }, { - "grantee": "dashboard_user", - "privilege": "EXECUTE", + "grantee": "supabase_realtime_admin", + "privilege": "USAGE", "grantable": false } ], "security_labels": [] }, - "procedure:auth.role()": { - "schema": "auth", - "name": "role", - "kind": "f", - "return_type": "text", - "return_type_schema": "pg_catalog", - "language": "sql", - "security_definer": false, - "volatility": "s", - "parallel_safety": "u", - "execution_cost": 100, - "result_rows": 0, - "is_strict": false, - "leakproof": false, - "returns_set": false, - "argument_count": 0, - "argument_default_count": 0, - "argument_names": null, - "argument_types": [], - "all_argument_types": [], - "argument_modes": null, - "argument_defaults": null, - "source_code": "\n select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n", - "binary_path": null, - "sql_body": null, - "definition": "CREATE OR REPLACE FUNCTION auth.role()\n RETURNS text\n LANGUAGE sql\n STABLE\nAS $function$\n select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n$function$\n", - "config": null, - "owner": "supabase_auth_admin", + "type:realtime.wal_column": { + "schema": "realtime", + "name": "wal_column", + "row_security": false, + "force_row_security": false, + "has_indexes": false, + "has_rules": false, + "has_triggers": false, + "has_subclasses": false, + "is_populated": true, + "replica_identity": "n", + "is_partition": false, + "options": null, + "partition_bound": null, + "owner": "supabase_realtime_admin", "comment": null, - "privileges": [ - { - "grantee": "PUBLIC", - "privilege": "EXECUTE", - "grantable": false - }, + "columns": [ { - "grantee": "supabase_auth_admin", - "privilege": "EXECUTE", - "grantable": false + "name": "name", + "position": 1, + "data_type": "text", + "data_type_str": "text", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null }, { - "grantee": "dashboard_user", - "privilege": "EXECUTE", - "grantable": false - } - ], - "security_labels": [] - }, - "procedure:auth.uid()": { - "schema": "auth", - "name": "uid", - "kind": "f", - "return_type": "uuid", - "return_type_schema": "pg_catalog", - "language": "sql", - "security_definer": false, - "volatility": "s", - "parallel_safety": "u", - "execution_cost": 100, - "result_rows": 0, - "is_strict": false, - "leakproof": false, - "returns_set": false, - "argument_count": 0, - "argument_default_count": 0, - "argument_names": null, - "argument_types": [], - "all_argument_types": [], - "argument_modes": null, - "argument_defaults": null, - "source_code": "\n select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n", - "binary_path": null, - "sql_body": null, - "definition": "CREATE OR REPLACE FUNCTION auth.uid()\n RETURNS uuid\n LANGUAGE sql\n STABLE\nAS $function$\n select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n$function$\n", - "config": null, - "owner": "supabase_auth_admin", - "comment": null, - "privileges": [ - { - "grantee": "PUBLIC", - "privilege": "EXECUTE", - "grantable": false + "name": "type_name", + "position": 2, + "data_type": "text", + "data_type_str": "text", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null }, { - "grantee": "supabase_auth_admin", - "privilege": "EXECUTE", - "grantable": false + "name": "type_oid", + "position": 3, + "data_type": "oid", + "data_type_str": "oid", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null }, { - "grantee": "dashboard_user", - "privilege": "EXECUTE", - "grantable": false - } - ], - "security_labels": [] - }, - "procedure:extensions.grant_pg_cron_access()": { - "schema": "extensions", - "name": "grant_pg_cron_access", - "kind": "f", - "return_type": "event_trigger", - "return_type_schema": "pg_catalog", - "language": "plpgsql", - "security_definer": false, - "volatility": "v", - "parallel_safety": "u", - "execution_cost": 100, - "result_rows": 0, - "is_strict": false, - "leakproof": false, - "returns_set": false, - "argument_count": 0, - "argument_default_count": 0, - "argument_names": null, - "argument_types": [], - "all_argument_types": [], - "argument_modes": null, - "argument_defaults": null, - "source_code": "\nBEGIN\n IF EXISTS (\n SELECT\n FROM pg_event_trigger_ddl_commands() AS ev\n JOIN pg_extension AS ext\n ON ev.objid = ext.oid\n WHERE ext.extname = 'pg_cron'\n )\n THEN\n grant usage on schema cron to postgres with grant option;\n\n alter default privileges in schema cron grant all on tables to postgres with grant option;\n alter default privileges in schema cron grant all on functions to postgres with grant option;\n alter default privileges in schema cron grant all on sequences to postgres with grant option;\n\n alter default privileges for user supabase_admin in schema cron grant all\n on sequences to postgres with grant option;\n alter default privileges for user supabase_admin in schema cron grant all\n on tables to postgres with grant option;\n alter default privileges for user supabase_admin in schema cron grant all\n on functions to postgres with grant option;\n\n grant all privileges on all tables in schema cron to postgres with grant option;\n revoke all on table cron.job from postgres;\n grant select on table cron.job to postgres with grant option;\n END IF;\nEND;\n", - "binary_path": null, - "sql_body": null, - "definition": "CREATE OR REPLACE FUNCTION extensions.grant_pg_cron_access()\n RETURNS event_trigger\n LANGUAGE plpgsql\nAS $function$\nBEGIN\n IF EXISTS (\n SELECT\n FROM pg_event_trigger_ddl_commands() AS ev\n JOIN pg_extension AS ext\n ON ev.objid = ext.oid\n WHERE ext.extname = 'pg_cron'\n )\n THEN\n grant usage on schema cron to postgres with grant option;\n\n alter default privileges in schema cron grant all on tables to postgres with grant option;\n alter default privileges in schema cron grant all on functions to postgres with grant option;\n alter default privileges in schema cron grant all on sequences to postgres with grant option;\n\n alter default privileges for user supabase_admin in schema cron grant all\n on sequences to postgres with grant option;\n alter default privileges for user supabase_admin in schema cron grant all\n on tables to postgres with grant option;\n alter default privileges for user supabase_admin in schema cron grant all\n on functions to postgres with grant option;\n\n grant all privileges on all tables in schema cron to postgres with grant option;\n revoke all on table cron.job from postgres;\n grant select on table cron.job to postgres with grant option;\n END IF;\nEND;\n$function$\n", - "config": null, - "owner": "supabase_admin", - "comment": "Grants access to pg_cron", - "privileges": [ - { - "grantee": "PUBLIC", - "privilege": "EXECUTE", - "grantable": false + "name": "value", + "position": 4, + "data_type": "jsonb", + "data_type_str": "jsonb", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null }, { - "grantee": "supabase_admin", - "privilege": "EXECUTE", - "grantable": true + "name": "is_pkey", + "position": 5, + "data_type": "boolean", + "data_type_str": "boolean", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null }, { - "grantee": "dashboard_user", - "privilege": "EXECUTE", - "grantable": false + "name": "is_selectable", + "position": 6, + "data_type": "boolean", + "data_type_str": "boolean", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null } ], - "security_labels": [] - }, - "procedure:extensions.grant_pg_graphql_access()": { - "schema": "extensions", - "name": "grant_pg_graphql_access", - "kind": "f", - "return_type": "event_trigger", - "return_type_schema": "pg_catalog", - "language": "plpgsql", - "security_definer": false, - "volatility": "v", - "parallel_safety": "u", - "execution_cost": 100, - "result_rows": 0, - "is_strict": false, - "leakproof": false, - "returns_set": false, - "argument_count": 0, - "argument_default_count": 0, - "argument_names": null, - "argument_types": [], - "all_argument_types": [], - "argument_modes": null, - "argument_defaults": null, - "source_code": "\nDECLARE\n func_is_graphql_resolve bool;\nBEGIN\n func_is_graphql_resolve = (\n SELECT n.proname = 'resolve'\n FROM pg_event_trigger_ddl_commands() AS ev\n LEFT JOIN pg_catalog.pg_proc AS n\n ON ev.objid = n.oid\n );\n\n IF func_is_graphql_resolve\n THEN\n -- Update public wrapper to pass all arguments through to the pg_graphql resolve func\n DROP FUNCTION IF EXISTS graphql_public.graphql;\n create or replace function graphql_public.graphql(\n \"operationName\" text default null,\n query text default null,\n variables jsonb default null,\n extensions jsonb default null\n )\n returns jsonb\n language sql\n as $$\n select graphql.resolve(\n query := query,\n variables := coalesce(variables, '{}'),\n \"operationName\" := \"operationName\",\n extensions := extensions\n );\n $$;\n\n -- This hook executes when `graphql.resolve` is created. That is not necessarily the last\n -- function in the extension so we need to grant permissions on existing entities AND\n -- update default permissions to any others that are created after `graphql.resolve`\n grant usage on schema graphql to postgres, anon, authenticated, service_role;\n grant select on all tables in schema graphql to postgres, anon, authenticated, service_role;\n grant execute on all functions in schema graphql to postgres, anon, authenticated, service_role;\n grant all on all sequences in schema graphql to postgres, anon, authenticated, service_role;\n alter default privileges in schema graphql grant all on tables to postgres, anon, authenticated, service_role;\n alter default privileges in schema graphql grant all on functions to postgres, anon, authenticated, service_role;\n alter default privileges in schema graphql grant all on sequences to postgres, anon, authenticated, service_role;\n\n -- Allow postgres role to allow granting usage on graphql and graphql_public schemas to custom roles\n grant usage on schema graphql_public to postgres with grant option;\n grant usage on schema graphql to postgres with grant option;\n END IF;\n\nEND;\n", - "binary_path": null, - "sql_body": null, - "definition": "CREATE OR REPLACE FUNCTION extensions.grant_pg_graphql_access()\n RETURNS event_trigger\n LANGUAGE plpgsql\nAS $function$\nDECLARE\n func_is_graphql_resolve bool;\nBEGIN\n func_is_graphql_resolve = (\n SELECT n.proname = 'resolve'\n FROM pg_event_trigger_ddl_commands() AS ev\n LEFT JOIN pg_catalog.pg_proc AS n\n ON ev.objid = n.oid\n );\n\n IF func_is_graphql_resolve\n THEN\n -- Update public wrapper to pass all arguments through to the pg_graphql resolve func\n DROP FUNCTION IF EXISTS graphql_public.graphql;\n create or replace function graphql_public.graphql(\n \"operationName\" text default null,\n query text default null,\n variables jsonb default null,\n extensions jsonb default null\n )\n returns jsonb\n language sql\n as $$\n select graphql.resolve(\n query := query,\n variables := coalesce(variables, '{}'),\n \"operationName\" := \"operationName\",\n extensions := extensions\n );\n $$;\n\n -- This hook executes when `graphql.resolve` is created. That is not necessarily the last\n -- function in the extension so we need to grant permissions on existing entities AND\n -- update default permissions to any others that are created after `graphql.resolve`\n grant usage on schema graphql to postgres, anon, authenticated, service_role;\n grant select on all tables in schema graphql to postgres, anon, authenticated, service_role;\n grant execute on all functions in schema graphql to postgres, anon, authenticated, service_role;\n grant all on all sequences in schema graphql to postgres, anon, authenticated, service_role;\n alter default privileges in schema graphql grant all on tables to postgres, anon, authenticated, service_role;\n alter default privileges in schema graphql grant all on functions to postgres, anon, authenticated, service_role;\n alter default privileges in schema graphql grant all on sequences to postgres, anon, authenticated, service_role;\n\n -- Allow postgres role to allow granting usage on graphql and graphql_public schemas to custom roles\n grant usage on schema graphql_public to postgres with grant option;\n grant usage on schema graphql to postgres with grant option;\n END IF;\n\nEND;\n$function$\n", - "config": null, - "owner": "supabase_admin", - "comment": "Grants access to pg_graphql", "privileges": [ { "grantee": "PUBLIC", - "privilege": "EXECUTE", + "privilege": "USAGE", "grantable": false }, { - "grantee": "supabase_admin", - "privilege": "EXECUTE", + "grantee": "supabase_realtime_admin", + "privilege": "USAGE", "grantable": false - }, - { - "grantee": "postgres", - "privilege": "EXECUTE", - "grantable": true } ], "security_labels": [] }, - "procedure:extensions.grant_pg_net_access()": { - "schema": "extensions", - "name": "grant_pg_net_access", - "kind": "f", - "return_type": "event_trigger", - "return_type_schema": "pg_catalog", - "language": "plpgsql", - "security_definer": false, - "volatility": "v", - "parallel_safety": "u", - "execution_cost": 100, - "result_rows": 0, - "is_strict": false, - "leakproof": false, - "returns_set": false, - "argument_count": 0, - "argument_default_count": 0, - "argument_names": null, - "argument_types": [], - "all_argument_types": [], - "argument_modes": null, - "argument_defaults": null, - "source_code": "\nBEGIN\n IF EXISTS (\n SELECT 1\n FROM pg_event_trigger_ddl_commands() AS ev\n JOIN pg_extension AS ext\n ON ev.objid = ext.oid\n WHERE ext.extname = 'pg_net'\n )\n THEN\n IF NOT EXISTS (\n SELECT 1\n FROM pg_roles\n WHERE rolname = 'supabase_functions_admin'\n )\n THEN\n CREATE USER supabase_functions_admin NOINHERIT CREATEROLE LOGIN NOREPLICATION;\n END IF;\n\n GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role;\n\n IF EXISTS (\n SELECT FROM pg_extension\n WHERE extname = 'pg_net'\n -- all versions in use on existing projects as of 2025-02-20\n -- version 0.12.0 onwards don't need these applied\n AND extversion IN ('0.2', '0.6', '0.7', '0.7.1', '0.8', '0.10.0', '0.11.0')\n ) THEN\n ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER;\n ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER;\n\n ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net;\n ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net;\n\n REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC;\n REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC;\n\n GRANT EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role;\n GRANT EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role;\n END IF;\n END IF;\nEND;\n", - "binary_path": null, - "sql_body": null, - "definition": "CREATE OR REPLACE FUNCTION extensions.grant_pg_net_access()\n RETURNS event_trigger\n LANGUAGE plpgsql\nAS $function$\nBEGIN\n IF EXISTS (\n SELECT 1\n FROM pg_event_trigger_ddl_commands() AS ev\n JOIN pg_extension AS ext\n ON ev.objid = ext.oid\n WHERE ext.extname = 'pg_net'\n )\n THEN\n IF NOT EXISTS (\n SELECT 1\n FROM pg_roles\n WHERE rolname = 'supabase_functions_admin'\n )\n THEN\n CREATE USER supabase_functions_admin NOINHERIT CREATEROLE LOGIN NOREPLICATION;\n END IF;\n\n GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role;\n\n IF EXISTS (\n SELECT FROM pg_extension\n WHERE extname = 'pg_net'\n -- all versions in use on existing projects as of 2025-02-20\n -- version 0.12.0 onwards don't need these applied\n AND extversion IN ('0.2', '0.6', '0.7', '0.7.1', '0.8', '0.10.0', '0.11.0')\n ) THEN\n ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER;\n ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER;\n\n ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net;\n ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net;\n\n REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC;\n REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC;\n\n GRANT EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role;\n GRANT EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role;\n END IF;\n END IF;\nEND;\n$function$\n", - "config": null, - "owner": "supabase_admin", - "comment": "Grants access to pg_net", - "privileges": [ + "type:realtime.wal_rls": { + "schema": "realtime", + "name": "wal_rls", + "row_security": false, + "force_row_security": false, + "has_indexes": false, + "has_rules": false, + "has_triggers": false, + "has_subclasses": false, + "is_populated": true, + "replica_identity": "n", + "is_partition": false, + "options": null, + "partition_bound": null, + "owner": "supabase_realtime_admin", + "comment": null, + "columns": [ { - "grantee": "PUBLIC", - "privilege": "EXECUTE", - "grantable": false + "name": "wal", + "position": 1, + "data_type": "jsonb", + "data_type_str": "jsonb", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null }, { - "grantee": "supabase_admin", - "privilege": "EXECUTE", - "grantable": true + "name": "is_rls_enabled", + "position": 2, + "data_type": "boolean", + "data_type_str": "boolean", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null }, { - "grantee": "dashboard_user", - "privilege": "EXECUTE", - "grantable": false + "name": "subscription_ids", + "position": 3, + "data_type": "uuid[]", + "data_type_str": "uuid[]", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null + }, + { + "name": "errors", + "position": 4, + "data_type": "text[]", + "data_type_str": "text[]", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null } ], - "security_labels": [] - }, - "procedure:extensions.pgrst_ddl_watch()": { - "schema": "extensions", - "name": "pgrst_ddl_watch", - "kind": "f", - "return_type": "event_trigger", - "return_type_schema": "pg_catalog", - "language": "plpgsql", - "security_definer": false, - "volatility": "v", - "parallel_safety": "u", - "execution_cost": 100, - "result_rows": 0, - "is_strict": false, - "leakproof": false, - "returns_set": false, - "argument_count": 0, - "argument_default_count": 0, - "argument_names": null, - "argument_types": [], - "all_argument_types": [], - "argument_modes": null, - "argument_defaults": null, - "source_code": "\nDECLARE\n cmd record;\nBEGIN\n FOR cmd IN SELECT * FROM pg_event_trigger_ddl_commands()\n LOOP\n IF cmd.command_tag IN (\n 'CREATE SCHEMA', 'ALTER SCHEMA'\n , 'CREATE TABLE', 'CREATE TABLE AS', 'SELECT INTO', 'ALTER TABLE'\n , 'CREATE FOREIGN TABLE', 'ALTER FOREIGN TABLE'\n , 'CREATE VIEW', 'ALTER VIEW'\n , 'CREATE MATERIALIZED VIEW', 'ALTER MATERIALIZED VIEW'\n , 'CREATE FUNCTION', 'ALTER FUNCTION'\n , 'CREATE TRIGGER'\n , 'CREATE TYPE', 'ALTER TYPE'\n , 'CREATE RULE'\n , 'COMMENT'\n )\n -- don't notify in case of CREATE TEMP table or other objects created on pg_temp\n AND cmd.schema_name is distinct from 'pg_temp'\n THEN\n NOTIFY pgrst, 'reload schema';\n END IF;\n END LOOP;\nEND; ", - "binary_path": null, - "sql_body": null, - "definition": "CREATE OR REPLACE FUNCTION extensions.pgrst_ddl_watch()\n RETURNS event_trigger\n LANGUAGE plpgsql\nAS $function$\nDECLARE\n cmd record;\nBEGIN\n FOR cmd IN SELECT * FROM pg_event_trigger_ddl_commands()\n LOOP\n IF cmd.command_tag IN (\n 'CREATE SCHEMA', 'ALTER SCHEMA'\n , 'CREATE TABLE', 'CREATE TABLE AS', 'SELECT INTO', 'ALTER TABLE'\n , 'CREATE FOREIGN TABLE', 'ALTER FOREIGN TABLE'\n , 'CREATE VIEW', 'ALTER VIEW'\n , 'CREATE MATERIALIZED VIEW', 'ALTER MATERIALIZED VIEW'\n , 'CREATE FUNCTION', 'ALTER FUNCTION'\n , 'CREATE TRIGGER'\n , 'CREATE TYPE', 'ALTER TYPE'\n , 'CREATE RULE'\n , 'COMMENT'\n )\n -- don't notify in case of CREATE TEMP table or other objects created on pg_temp\n AND cmd.schema_name is distinct from 'pg_temp'\n THEN\n NOTIFY pgrst, 'reload schema';\n END IF;\n END LOOP;\nEND; $function$\n", - "config": null, - "owner": "supabase_admin", - "comment": null, "privileges": [ { "grantee": "PUBLIC", - "privilege": "EXECUTE", + "privilege": "USAGE", "grantable": false }, { - "grantee": "supabase_admin", - "privilege": "EXECUTE", + "grantee": "supabase_realtime_admin", + "privilege": "USAGE", "grantable": false + } + ], + "security_labels": [] + } + }, + "domains": {}, + "enums": { + "type:realtime.action": { + "schema": "realtime", + "name": "action", + "owner": "supabase_realtime_admin", + "labels": [ + { + "sort_order": 1, + "label": "INSERT" }, { - "grantee": "postgres", - "privilege": "EXECUTE", - "grantable": true + "sort_order": 2, + "label": "UPDATE" + }, + { + "sort_order": 3, + "label": "DELETE" + }, + { + "sort_order": 4, + "label": "TRUNCATE" + }, + { + "sort_order": 5, + "label": "ERROR" } ], - "security_labels": [] - }, - "procedure:extensions.pgrst_drop_watch()": { - "schema": "extensions", - "name": "pgrst_drop_watch", - "kind": "f", - "return_type": "event_trigger", - "return_type_schema": "pg_catalog", - "language": "plpgsql", - "security_definer": false, - "volatility": "v", - "parallel_safety": "u", - "execution_cost": 100, - "result_rows": 0, - "is_strict": false, - "leakproof": false, - "returns_set": false, - "argument_count": 0, - "argument_default_count": 0, - "argument_names": null, - "argument_types": [], - "all_argument_types": [], - "argument_modes": null, - "argument_defaults": null, - "source_code": "\nDECLARE\n obj record;\nBEGIN\n FOR obj IN SELECT * FROM pg_event_trigger_dropped_objects()\n LOOP\n IF obj.object_type IN (\n 'schema'\n , 'table'\n , 'foreign table'\n , 'view'\n , 'materialized view'\n , 'function'\n , 'trigger'\n , 'type'\n , 'rule'\n )\n AND obj.is_temporary IS false -- no pg_temp objects\n THEN\n NOTIFY pgrst, 'reload schema';\n END IF;\n END LOOP;\nEND; ", - "binary_path": null, - "sql_body": null, - "definition": "CREATE OR REPLACE FUNCTION extensions.pgrst_drop_watch()\n RETURNS event_trigger\n LANGUAGE plpgsql\nAS $function$\nDECLARE\n obj record;\nBEGIN\n FOR obj IN SELECT * FROM pg_event_trigger_dropped_objects()\n LOOP\n IF obj.object_type IN (\n 'schema'\n , 'table'\n , 'foreign table'\n , 'view'\n , 'materialized view'\n , 'function'\n , 'trigger'\n , 'type'\n , 'rule'\n )\n AND obj.is_temporary IS false -- no pg_temp objects\n THEN\n NOTIFY pgrst, 'reload schema';\n END IF;\n END LOOP;\nEND; $function$\n", - "config": null, - "owner": "supabase_admin", "comment": null, "privileges": [ { "grantee": "PUBLIC", - "privilege": "EXECUTE", + "privilege": "USAGE", "grantable": false }, { - "grantee": "supabase_admin", - "privilege": "EXECUTE", + "grantee": "supabase_realtime_admin", + "privilege": "USAGE", "grantable": false - }, - { - "grantee": "postgres", - "privilege": "EXECUTE", - "grantable": true } ], "security_labels": [] }, - "procedure:extensions.set_graphql_placeholder()": { - "schema": "extensions", - "name": "set_graphql_placeholder", - "kind": "f", - "return_type": "event_trigger", - "return_type_schema": "pg_catalog", - "language": "plpgsql", - "security_definer": false, - "volatility": "v", - "parallel_safety": "u", - "execution_cost": 100, - "result_rows": 0, - "is_strict": false, - "leakproof": false, - "returns_set": false, - "argument_count": 0, - "argument_default_count": 0, - "argument_names": null, - "argument_types": [], - "all_argument_types": [], - "argument_modes": null, - "argument_defaults": null, - "source_code": "\n DECLARE\n graphql_is_dropped bool;\n BEGIN\n graphql_is_dropped = (\n SELECT ev.schema_name = 'graphql_public'\n FROM pg_event_trigger_dropped_objects() AS ev\n WHERE ev.schema_name = 'graphql_public'\n );\n\n IF graphql_is_dropped\n THEN\n create or replace function graphql_public.graphql(\n \"operationName\" text default null,\n query text default null,\n variables jsonb default null,\n extensions jsonb default null\n )\n returns jsonb\n language plpgsql\n as $$\n DECLARE\n server_version float;\n BEGIN\n server_version = (SELECT (SPLIT_PART((select version()), ' ', 2))::float);\n\n IF server_version >= 14 THEN\n RETURN jsonb_build_object(\n 'errors', jsonb_build_array(\n jsonb_build_object(\n 'message', 'pg_graphql extension is not enabled.'\n )\n )\n );\n ELSE\n RETURN jsonb_build_object(\n 'errors', jsonb_build_array(\n jsonb_build_object(\n 'message', 'pg_graphql is only available on projects running Postgres 14 onwards.'\n )\n )\n );\n END IF;\n END;\n $$;\n END IF;\n\n END;\n", - "binary_path": null, - "sql_body": null, - "definition": "CREATE OR REPLACE FUNCTION extensions.set_graphql_placeholder()\n RETURNS event_trigger\n LANGUAGE plpgsql\nAS $function$\n DECLARE\n graphql_is_dropped bool;\n BEGIN\n graphql_is_dropped = (\n SELECT ev.schema_name = 'graphql_public'\n FROM pg_event_trigger_dropped_objects() AS ev\n WHERE ev.schema_name = 'graphql_public'\n );\n\n IF graphql_is_dropped\n THEN\n create or replace function graphql_public.graphql(\n \"operationName\" text default null,\n query text default null,\n variables jsonb default null,\n extensions jsonb default null\n )\n returns jsonb\n language plpgsql\n as $$\n DECLARE\n server_version float;\n BEGIN\n server_version = (SELECT (SPLIT_PART((select version()), ' ', 2))::float);\n\n IF server_version >= 14 THEN\n RETURN jsonb_build_object(\n 'errors', jsonb_build_array(\n jsonb_build_object(\n 'message', 'pg_graphql extension is not enabled.'\n )\n )\n );\n ELSE\n RETURN jsonb_build_object(\n 'errors', jsonb_build_array(\n jsonb_build_object(\n 'message', 'pg_graphql is only available on projects running Postgres 14 onwards.'\n )\n )\n );\n END IF;\n END;\n $$;\n END IF;\n\n END;\n$function$\n", - "config": null, - "owner": "supabase_admin", - "comment": "Reintroduces placeholder function for graphql_public.graphql", + "type:realtime.equality_op": { + "schema": "realtime", + "name": "equality_op", + "owner": "supabase_realtime_admin", + "labels": [ + { + "sort_order": 1, + "label": "eq" + }, + { + "sort_order": 2, + "label": "neq" + }, + { + "sort_order": 3, + "label": "lt" + }, + { + "sort_order": 4, + "label": "lte" + }, + { + "sort_order": 5, + "label": "gt" + }, + { + "sort_order": 6, + "label": "gte" + }, + { + "sort_order": 7, + "label": "in" + } + ], + "comment": null, "privileges": [ { "grantee": "PUBLIC", - "privilege": "EXECUTE", + "privilege": "USAGE", "grantable": false }, { - "grantee": "supabase_admin", - "privilege": "EXECUTE", + "grantee": "supabase_realtime_admin", + "privilege": "USAGE", "grantable": false - }, - { - "grantee": "postgres", - "privilege": "EXECUTE", - "grantable": true } ], "security_labels": [] - }, - "procedure:pgbouncer.get_auth(text)": { - "schema": "pgbouncer", - "name": "get_auth", - "kind": "f", - "return_type": "record", - "return_type_schema": "pg_catalog", - "language": "plpgsql", - "security_definer": true, - "volatility": "v", + } + }, + "extensions": { + "extension:\"uuid-ossp\"": { + "name": "\"uuid-ossp\"", + "schema": "extensions", + "relocatable": true, + "version": "1.1", + "owner": "supabase_admin", + "comment": "generate universally unique identifiers (UUIDs)", + "members": [ + "procedure:extensions.uuid_generate_v1()", + "procedure:extensions.uuid_generate_v1mc()", + "procedure:extensions.uuid_generate_v3(uuid,text)", + "procedure:extensions.uuid_generate_v4()", + "procedure:extensions.uuid_generate_v5(uuid,text)", + "procedure:extensions.uuid_nil()", + "procedure:extensions.uuid_ns_dns()", + "procedure:extensions.uuid_ns_oid()", + "procedure:extensions.uuid_ns_url()", + "procedure:extensions.uuid_ns_x500()" + ] + }, + "extension:pg_graphql": { + "name": "pg_graphql", + "schema": "graphql", + "relocatable": false, + "version": "1.5.11", + "owner": "supabase_admin", + "comment": "pg_graphql: GraphQL support", + "members": [ + "eventTrigger:graphql_watch_ddl", + "eventTrigger:graphql_watch_drop", + "procedure:graphql._internal_resolve(text,jsonb,text,jsonb)", + "procedure:graphql.comment_directive(text)", + "procedure:graphql.exception(text)", + "procedure:graphql.get_schema_version()", + "procedure:graphql.increment_schema_version()", + "procedure:graphql.resolve(text,jsonb,text,jsonb)", + "procedure:graphql_public.graphql(text,text,jsonb,jsonb)", + "sequence:graphql.seq_schema_version" + ] + }, + "extension:pg_stat_statements": { + "name": "pg_stat_statements", + "schema": "extensions", + "relocatable": true, + "version": "1.11", + "owner": "supabase_admin", + "comment": "track planning and execution statistics of all SQL statements executed", + "members": [ + "procedure:extensions.pg_stat_statements(boolean)", + "procedure:extensions.pg_stat_statements_info()", + "procedure:extensions.pg_stat_statements_reset(oid,oid,bigint,boolean)", + "type:extensions._pg_stat_statements", + "type:extensions._pg_stat_statements_info", + "view:extensions.pg_stat_statements", + "view:extensions.pg_stat_statements", + "view:extensions.pg_stat_statements_info", + "view:extensions.pg_stat_statements_info" + ] + }, + "extension:pgcrypto": { + "name": "pgcrypto", + "schema": "extensions", + "relocatable": true, + "version": "1.3", + "owner": "supabase_admin", + "comment": "cryptographic functions", + "members": [ + "procedure:extensions.armor(bytea)", + "procedure:extensions.armor(bytea,text[],text[])", + "procedure:extensions.crypt(text,text)", + "procedure:extensions.dearmor(text)", + "procedure:extensions.decrypt(bytea,bytea,text)", + "procedure:extensions.decrypt_iv(bytea,bytea,bytea,text)", + "procedure:extensions.digest(bytea,text)", + "procedure:extensions.digest(text,text)", + "procedure:extensions.encrypt(bytea,bytea,text)", + "procedure:extensions.encrypt_iv(bytea,bytea,bytea,text)", + "procedure:extensions.gen_random_bytes(integer)", + "procedure:extensions.gen_random_uuid()", + "procedure:extensions.gen_salt(text)", + "procedure:extensions.gen_salt(text,integer)", + "procedure:extensions.hmac(bytea,bytea,text)", + "procedure:extensions.hmac(text,text,text)", + "procedure:extensions.pgp_armor_headers(text)", + "procedure:extensions.pgp_key_id(bytea)", + "procedure:extensions.pgp_pub_decrypt(bytea,bytea)", + "procedure:extensions.pgp_pub_decrypt(bytea,bytea,text)", + "procedure:extensions.pgp_pub_decrypt(bytea,bytea,text,text)", + "procedure:extensions.pgp_pub_decrypt_bytea(bytea,bytea)", + "procedure:extensions.pgp_pub_decrypt_bytea(bytea,bytea,text)", + "procedure:extensions.pgp_pub_decrypt_bytea(bytea,bytea,text,text)", + "procedure:extensions.pgp_pub_encrypt(text,bytea)", + "procedure:extensions.pgp_pub_encrypt(text,bytea,text)", + "procedure:extensions.pgp_pub_encrypt_bytea(bytea,bytea)", + "procedure:extensions.pgp_pub_encrypt_bytea(bytea,bytea,text)", + "procedure:extensions.pgp_sym_decrypt(bytea,text)", + "procedure:extensions.pgp_sym_decrypt(bytea,text,text)", + "procedure:extensions.pgp_sym_decrypt_bytea(bytea,text)", + "procedure:extensions.pgp_sym_decrypt_bytea(bytea,text,text)", + "procedure:extensions.pgp_sym_encrypt(text,text)", + "procedure:extensions.pgp_sym_encrypt(text,text,text)", + "procedure:extensions.pgp_sym_encrypt_bytea(bytea,text)", + "procedure:extensions.pgp_sym_encrypt_bytea(bytea,text,text)" + ] + }, + "extension:plpgsql": { + "name": "plpgsql", + "schema": "pg_catalog", + "relocatable": false, + "version": "1.0", + "owner": "supabase_admin", + "comment": "PL/pgSQL procedural language", + "members": [ + "procedure:pg_catalog.plpgsql_call_handler()", + "procedure:pg_catalog.plpgsql_inline_handler(internal)", + "procedure:pg_catalog.plpgsql_validator(oid)" + ] + }, + "extension:supabase_vault": { + "name": "supabase_vault", + "schema": "vault", + "relocatable": false, + "version": "0.3.1", + "owner": "supabase_admin", + "comment": "Supabase Vault Extension", + "members": [ + "procedure:vault._crypto_aead_det_decrypt(bytea,bytea,bigint,bytea,bytea)", + "procedure:vault._crypto_aead_det_encrypt(bytea,bytea,bigint,bytea,bytea)", + "procedure:vault._crypto_aead_det_noncegen()", + "procedure:vault.create_secret(text,text,text,uuid)", + "procedure:vault.update_secret(uuid,text,text,text,uuid)", + "table:vault.secrets", + "table:vault.secrets", + "type:vault._decrypted_secrets", + "type:vault._secrets", + "view:vault.decrypted_secrets", + "view:vault.decrypted_secrets" + ] + } + }, + "procedures": { + "procedure:auth.email()": { + "schema": "auth", + "name": "email", + "kind": "f", + "return_type": "text", + "return_type_schema": "pg_catalog", + "language": "sql", + "security_definer": false, + "volatility": "s", "parallel_safety": "u", "execution_cost": 100, - "result_rows": 1000, + "result_rows": 0, "is_strict": false, "leakproof": false, - "returns_set": true, - "argument_count": 1, + "returns_set": false, + "argument_count": 0, "argument_default_count": 0, - "argument_names": [ - "p_usename", - "username", - "password" - ], - "argument_types": [ - "text" - ], - "all_argument_types": [ - "text", - "text", - "text" - ], - "argument_modes": [ - "i", - "t", - "t" - ], + "argument_names": null, + "argument_types": [], + "all_argument_types": [], + "argument_modes": null, "argument_defaults": null, - "source_code": "\nbegin\n raise debug 'PgBouncer auth request: %', p_usename;\n\n return query\n select \n rolname::text, \n case when rolvaliduntil < now() \n then null \n else rolpassword::text \n end \n from pg_authid \n where rolname=$1 and rolcanlogin;\nend;\n", + "source_code": "\n select nullif(current_setting('request.jwt.claim.email', true), '')::text;\n", "binary_path": null, "sql_body": null, - "definition": "CREATE OR REPLACE FUNCTION pgbouncer.get_auth(p_usename text)\n RETURNS TABLE(username text, password text)\n LANGUAGE plpgsql\n SECURITY DEFINER\n SET search_path TO ''\nAS $function$\nbegin\n raise debug 'PgBouncer auth request: %', p_usename;\n\n return query\n select \n rolname::text, \n case when rolvaliduntil < now() \n then null \n else rolpassword::text \n end \n from pg_authid \n where rolname=$1 and rolcanlogin;\nend;\n$function$\n", - "config": [ - "search_path=\"\"" - ], - "owner": "supabase_admin", + "definition": "CREATE OR REPLACE FUNCTION auth.email()\n RETURNS text\n LANGUAGE sql\n STABLE\nAS $function$\n select nullif(current_setting('request.jwt.claim.email', true), '')::text;\n$function$\n", + "config": null, + "owner": "supabase_auth_admin", "comment": null, "privileges": [ { - "grantee": "supabase_admin", + "grantee": "PUBLIC", "privilege": "EXECUTE", "grantable": false }, { - "grantee": "pgbouncer", + "grantee": "supabase_auth_admin", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "dashboard_user", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "supabase_realtime_admin", "privilege": "EXECUTE", "grantable": false } ], "security_labels": [] - } - }, - "indexes": { - "index:auth.audit_log_entries.audit_log_entries_pkey": { - "schema": "auth", - "table_name": "audit_log_entries", - "name": "audit_log_entries_pkey", - "storage_params": [], - "statistics_target": [ - -1 - ], - "index_type": "btree", - "tablespace": null, - "is_unique": true, - "is_primary": true, - "is_exclusion": false, - "nulls_not_distinct": false, - "immediate": true, - "is_clustered": false, - "is_replica_identity": false, - "key_columns": [ - 2 - ], - "column_collations": [ - null - ], - "operator_classes": [ - "default" - ], - "column_options": [ - 0 - ], - "index_expressions": null, - "partial_predicate": null, - "table_relkind": "r", - "is_owned_by_constraint": true, - "is_partitioned_index": false, - "is_index_partition": false, - "parent_index_name": null, - "definition": "CREATE UNIQUE INDEX audit_log_entries_pkey ON auth.audit_log_entries USING btree (id)", - "comment": null, - "owner": "supabase_auth_admin" }, - "index:auth.audit_log_entries.audit_logs_instance_id_idx": { + "procedure:auth.role()": { "schema": "auth", - "table_name": "audit_log_entries", - "name": "audit_logs_instance_id_idx", - "storage_params": [], - "statistics_target": [ - -1 - ], - "index_type": "btree", - "tablespace": null, - "is_unique": false, - "is_primary": false, - "is_exclusion": false, - "nulls_not_distinct": false, - "immediate": true, - "is_clustered": false, - "is_replica_identity": false, - "key_columns": [ - 1 - ], - "column_collations": [ - null - ], - "operator_classes": [ - "default" - ], - "column_options": [ - 0 - ], - "index_expressions": null, - "partial_predicate": null, - "table_relkind": "r", - "is_owned_by_constraint": false, - "is_partitioned_index": false, - "is_index_partition": false, - "parent_index_name": null, - "definition": "CREATE INDEX audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id)", + "name": "role", + "kind": "f", + "return_type": "text", + "return_type_schema": "pg_catalog", + "language": "sql", + "security_definer": false, + "volatility": "s", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 0, + "argument_default_count": 0, + "argument_names": null, + "argument_types": [], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\n select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION auth.role()\n RETURNS text\n LANGUAGE sql\n STABLE\nAS $function$\n select nullif(current_setting('request.jwt.claim.role', true), '')::text;\n$function$\n", + "config": null, + "owner": "supabase_auth_admin", "comment": null, - "owner": "supabase_auth_admin" - }, - "index:auth.instances.instances_pkey": { - "schema": "auth", - "table_name": "instances", - "name": "instances_pkey", - "storage_params": [], - "statistics_target": [ - -1 - ], - "index_type": "btree", - "tablespace": null, - "is_unique": true, - "is_primary": true, - "is_exclusion": false, - "nulls_not_distinct": false, - "immediate": true, - "is_clustered": false, - "is_replica_identity": false, - "key_columns": [ - 1 - ], - "column_collations": [ - null - ], - "operator_classes": [ - "default" - ], - "column_options": [ - 0 + "privileges": [ + { + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "supabase_auth_admin", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "dashboard_user", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false + } ], - "index_expressions": null, - "partial_predicate": null, - "table_relkind": "r", - "is_owned_by_constraint": true, - "is_partitioned_index": false, - "is_index_partition": false, - "parent_index_name": null, - "definition": "CREATE UNIQUE INDEX instances_pkey ON auth.instances USING btree (id)", - "comment": null, - "owner": "supabase_auth_admin" + "security_labels": [] }, - "index:auth.refresh_tokens.refresh_tokens_instance_id_idx": { + "procedure:auth.uid()": { "schema": "auth", - "table_name": "refresh_tokens", - "name": "refresh_tokens_instance_id_idx", - "storage_params": [], - "statistics_target": [ - -1 - ], - "index_type": "btree", - "tablespace": null, - "is_unique": false, - "is_primary": false, - "is_exclusion": false, - "nulls_not_distinct": false, - "immediate": true, - "is_clustered": false, - "is_replica_identity": false, - "key_columns": [ - 1 - ], - "column_collations": [ - null - ], - "operator_classes": [ - "default" - ], - "column_options": [ - 0 - ], - "index_expressions": null, - "partial_predicate": null, - "table_relkind": "r", - "is_owned_by_constraint": false, - "is_partitioned_index": false, - "is_index_partition": false, - "parent_index_name": null, - "definition": "CREATE INDEX refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id)", + "name": "uid", + "kind": "f", + "return_type": "uuid", + "return_type_schema": "pg_catalog", + "language": "sql", + "security_definer": false, + "volatility": "s", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 0, + "argument_default_count": 0, + "argument_names": null, + "argument_types": [], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\n select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION auth.uid()\n RETURNS uuid\n LANGUAGE sql\n STABLE\nAS $function$\n select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid;\n$function$\n", + "config": null, + "owner": "supabase_auth_admin", "comment": null, - "owner": "supabase_auth_admin" - }, - "index:auth.refresh_tokens.refresh_tokens_token_idx": { - "schema": "auth", - "table_name": "refresh_tokens", - "name": "refresh_tokens_token_idx", - "storage_params": [], - "statistics_target": [ - -1 - ], - "index_type": "btree", - "tablespace": null, - "is_unique": false, - "is_primary": false, - "is_exclusion": false, - "nulls_not_distinct": false, - "immediate": true, - "is_clustered": false, - "is_replica_identity": false, - "key_columns": [ - 3 - ], - "column_collations": [ - null - ], - "operator_classes": [ - "default" - ], - "column_options": [ - 0 + "privileges": [ + { + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "supabase_auth_admin", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "dashboard_user", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false + } ], - "index_expressions": null, - "partial_predicate": null, - "table_relkind": "r", - "is_owned_by_constraint": false, - "is_partitioned_index": false, - "is_index_partition": false, - "parent_index_name": null, - "definition": "CREATE INDEX refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token)", - "comment": null, - "owner": "supabase_auth_admin" + "security_labels": [] }, - "index:auth.refresh_tokens.refresh_tokens_pkey": { - "schema": "auth", - "table_name": "refresh_tokens", - "name": "refresh_tokens_pkey", - "storage_params": [], - "statistics_target": [ - -1 - ], - "index_type": "btree", - "tablespace": null, - "is_unique": true, - "is_primary": true, - "is_exclusion": false, - "nulls_not_distinct": false, - "immediate": true, - "is_clustered": false, - "is_replica_identity": false, - "key_columns": [ - 2 - ], - "column_collations": [ - null - ], - "operator_classes": [ - "default" - ], - "column_options": [ - 0 + "procedure:extensions.grant_pg_cron_access()": { + "schema": "extensions", + "name": "grant_pg_cron_access", + "kind": "f", + "return_type": "event_trigger", + "return_type_schema": "pg_catalog", + "language": "plpgsql", + "security_definer": false, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 0, + "argument_default_count": 0, + "argument_names": null, + "argument_types": [], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\nBEGIN\n IF EXISTS (\n SELECT\n FROM pg_event_trigger_ddl_commands() AS ev\n JOIN pg_extension AS ext\n ON ev.objid = ext.oid\n WHERE ext.extname = 'pg_cron'\n )\n THEN\n grant usage on schema cron to postgres with grant option;\n\n alter default privileges in schema cron grant all on tables to postgres with grant option;\n alter default privileges in schema cron grant all on functions to postgres with grant option;\n alter default privileges in schema cron grant all on sequences to postgres with grant option;\n\n alter default privileges for user supabase_admin in schema cron grant all\n on sequences to postgres with grant option;\n alter default privileges for user supabase_admin in schema cron grant all\n on tables to postgres with grant option;\n alter default privileges for user supabase_admin in schema cron grant all\n on functions to postgres with grant option;\n\n grant all privileges on all tables in schema cron to postgres with grant option;\n revoke all on table cron.job from postgres;\n grant select on table cron.job to postgres with grant option;\n END IF;\nEND;\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION extensions.grant_pg_cron_access()\n RETURNS event_trigger\n LANGUAGE plpgsql\nAS $function$\nBEGIN\n IF EXISTS (\n SELECT\n FROM pg_event_trigger_ddl_commands() AS ev\n JOIN pg_extension AS ext\n ON ev.objid = ext.oid\n WHERE ext.extname = 'pg_cron'\n )\n THEN\n grant usage on schema cron to postgres with grant option;\n\n alter default privileges in schema cron grant all on tables to postgres with grant option;\n alter default privileges in schema cron grant all on functions to postgres with grant option;\n alter default privileges in schema cron grant all on sequences to postgres with grant option;\n\n alter default privileges for user supabase_admin in schema cron grant all\n on sequences to postgres with grant option;\n alter default privileges for user supabase_admin in schema cron grant all\n on tables to postgres with grant option;\n alter default privileges for user supabase_admin in schema cron grant all\n on functions to postgres with grant option;\n\n grant all privileges on all tables in schema cron to postgres with grant option;\n revoke all on table cron.job from postgres;\n grant select on table cron.job to postgres with grant option;\n END IF;\nEND;\n$function$\n", + "config": null, + "owner": "supabase_admin", + "comment": "Grants access to pg_cron", + "privileges": [ + { + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "EXECUTE", + "grantable": true + }, + { + "grantee": "dashboard_user", + "privilege": "EXECUTE", + "grantable": false + } ], - "index_expressions": null, - "partial_predicate": null, - "table_relkind": "r", - "is_owned_by_constraint": true, - "is_partitioned_index": false, - "is_index_partition": false, - "parent_index_name": null, - "definition": "CREATE UNIQUE INDEX refresh_tokens_pkey ON auth.refresh_tokens USING btree (id)", - "comment": null, - "owner": "supabase_auth_admin" + "security_labels": [] }, - "index:auth.refresh_tokens.refresh_tokens_instance_id_user_id_idx": { - "schema": "auth", - "table_name": "refresh_tokens", - "name": "refresh_tokens_instance_id_user_id_idx", - "storage_params": [], - "statistics_target": [ - -1, - -1 - ], - "index_type": "btree", - "tablespace": null, - "is_unique": false, - "is_primary": false, - "is_exclusion": false, - "nulls_not_distinct": false, - "immediate": true, - "is_clustered": false, - "is_replica_identity": false, - "key_columns": [ - 1, - 4 - ], - "column_collations": [ - null, - null - ], - "operator_classes": [ - "default", - "default" - ], - "column_options": [ - 0, - 0 + "procedure:extensions.grant_pg_graphql_access()": { + "schema": "extensions", + "name": "grant_pg_graphql_access", + "kind": "f", + "return_type": "event_trigger", + "return_type_schema": "pg_catalog", + "language": "plpgsql", + "security_definer": false, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 0, + "argument_default_count": 0, + "argument_names": null, + "argument_types": [], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\nDECLARE\n func_is_graphql_resolve bool;\nBEGIN\n func_is_graphql_resolve = (\n SELECT n.proname = 'resolve'\n FROM pg_event_trigger_ddl_commands() AS ev\n LEFT JOIN pg_catalog.pg_proc AS n\n ON ev.objid = n.oid\n );\n\n IF func_is_graphql_resolve\n THEN\n -- Update public wrapper to pass all arguments through to the pg_graphql resolve func\n DROP FUNCTION IF EXISTS graphql_public.graphql;\n create or replace function graphql_public.graphql(\n \"operationName\" text default null,\n query text default null,\n variables jsonb default null,\n extensions jsonb default null\n )\n returns jsonb\n language sql\n as $$\n select graphql.resolve(\n query := query,\n variables := coalesce(variables, '{}'),\n \"operationName\" := \"operationName\",\n extensions := extensions\n );\n $$;\n\n -- This hook executes when `graphql.resolve` is created. That is not necessarily the last\n -- function in the extension so we need to grant permissions on existing entities AND\n -- update default permissions to any others that are created after `graphql.resolve`\n grant usage on schema graphql to postgres, anon, authenticated, service_role;\n grant select on all tables in schema graphql to postgres, anon, authenticated, service_role;\n grant execute on all functions in schema graphql to postgres, anon, authenticated, service_role;\n grant all on all sequences in schema graphql to postgres, anon, authenticated, service_role;\n alter default privileges in schema graphql grant all on tables to postgres, anon, authenticated, service_role;\n alter default privileges in schema graphql grant all on functions to postgres, anon, authenticated, service_role;\n alter default privileges in schema graphql grant all on sequences to postgres, anon, authenticated, service_role;\n\n -- Allow postgres role to allow granting usage on graphql and graphql_public schemas to custom roles\n grant usage on schema graphql_public to postgres with grant option;\n grant usage on schema graphql to postgres with grant option;\n END IF;\n\nEND;\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION extensions.grant_pg_graphql_access()\n RETURNS event_trigger\n LANGUAGE plpgsql\nAS $function$\nDECLARE\n func_is_graphql_resolve bool;\nBEGIN\n func_is_graphql_resolve = (\n SELECT n.proname = 'resolve'\n FROM pg_event_trigger_ddl_commands() AS ev\n LEFT JOIN pg_catalog.pg_proc AS n\n ON ev.objid = n.oid\n );\n\n IF func_is_graphql_resolve\n THEN\n -- Update public wrapper to pass all arguments through to the pg_graphql resolve func\n DROP FUNCTION IF EXISTS graphql_public.graphql;\n create or replace function graphql_public.graphql(\n \"operationName\" text default null,\n query text default null,\n variables jsonb default null,\n extensions jsonb default null\n )\n returns jsonb\n language sql\n as $$\n select graphql.resolve(\n query := query,\n variables := coalesce(variables, '{}'),\n \"operationName\" := \"operationName\",\n extensions := extensions\n );\n $$;\n\n -- This hook executes when `graphql.resolve` is created. That is not necessarily the last\n -- function in the extension so we need to grant permissions on existing entities AND\n -- update default permissions to any others that are created after `graphql.resolve`\n grant usage on schema graphql to postgres, anon, authenticated, service_role;\n grant select on all tables in schema graphql to postgres, anon, authenticated, service_role;\n grant execute on all functions in schema graphql to postgres, anon, authenticated, service_role;\n grant all on all sequences in schema graphql to postgres, anon, authenticated, service_role;\n alter default privileges in schema graphql grant all on tables to postgres, anon, authenticated, service_role;\n alter default privileges in schema graphql grant all on functions to postgres, anon, authenticated, service_role;\n alter default privileges in schema graphql grant all on sequences to postgres, anon, authenticated, service_role;\n\n -- Allow postgres role to allow granting usage on graphql and graphql_public schemas to custom roles\n grant usage on schema graphql_public to postgres with grant option;\n grant usage on schema graphql to postgres with grant option;\n END IF;\n\nEND;\n$function$\n", + "config": null, + "owner": "supabase_admin", + "comment": "Grants access to pg_graphql", + "privileges": [ + { + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "postgres", + "privilege": "EXECUTE", + "grantable": true + } ], - "index_expressions": null, - "partial_predicate": null, - "table_relkind": "r", - "is_owned_by_constraint": false, - "is_partitioned_index": false, - "is_index_partition": false, - "parent_index_name": null, - "definition": "CREATE INDEX refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id)", - "comment": null, - "owner": "supabase_auth_admin" + "security_labels": [] }, - "index:auth.schema_migrations.schema_migrations_pkey": { - "schema": "auth", - "table_name": "schema_migrations", - "name": "schema_migrations_pkey", - "storage_params": [], - "statistics_target": [ - -1 - ], - "index_type": "btree", - "tablespace": null, - "is_unique": true, - "is_primary": true, - "is_exclusion": false, - "nulls_not_distinct": false, - "immediate": true, - "is_clustered": false, - "is_replica_identity": false, - "key_columns": [ - 1 - ], - "column_collations": [ - null - ], - "operator_classes": [ - "default" - ], - "column_options": [ - 0 + "procedure:extensions.grant_pg_net_access()": { + "schema": "extensions", + "name": "grant_pg_net_access", + "kind": "f", + "return_type": "event_trigger", + "return_type_schema": "pg_catalog", + "language": "plpgsql", + "security_definer": false, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 0, + "argument_default_count": 0, + "argument_names": null, + "argument_types": [], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\nBEGIN\n IF EXISTS (\n SELECT 1\n FROM pg_event_trigger_ddl_commands() AS ev\n JOIN pg_extension AS ext\n ON ev.objid = ext.oid\n WHERE ext.extname = 'pg_net'\n )\n THEN\n IF NOT EXISTS (\n SELECT 1\n FROM pg_roles\n WHERE rolname = 'supabase_functions_admin'\n )\n THEN\n CREATE USER supabase_functions_admin NOINHERIT CREATEROLE LOGIN NOREPLICATION;\n END IF;\n\n GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role;\n\n IF EXISTS (\n SELECT FROM pg_extension\n WHERE extname = 'pg_net'\n -- all versions in use on existing projects as of 2025-02-20\n -- version 0.12.0 onwards don't need these applied\n AND extversion IN ('0.2', '0.6', '0.7', '0.7.1', '0.8', '0.10.0', '0.11.0')\n ) THEN\n ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER;\n ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER;\n\n ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net;\n ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net;\n\n REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC;\n REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC;\n\n GRANT EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role;\n GRANT EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role;\n END IF;\n END IF;\nEND;\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION extensions.grant_pg_net_access()\n RETURNS event_trigger\n LANGUAGE plpgsql\nAS $function$\nBEGIN\n IF EXISTS (\n SELECT 1\n FROM pg_event_trigger_ddl_commands() AS ev\n JOIN pg_extension AS ext\n ON ev.objid = ext.oid\n WHERE ext.extname = 'pg_net'\n )\n THEN\n IF NOT EXISTS (\n SELECT 1\n FROM pg_roles\n WHERE rolname = 'supabase_functions_admin'\n )\n THEN\n CREATE USER supabase_functions_admin NOINHERIT CREATEROLE LOGIN NOREPLICATION;\n END IF;\n\n GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role;\n\n IF EXISTS (\n SELECT FROM pg_extension\n WHERE extname = 'pg_net'\n -- all versions in use on existing projects as of 2025-02-20\n -- version 0.12.0 onwards don't need these applied\n AND extversion IN ('0.2', '0.6', '0.7', '0.7.1', '0.8', '0.10.0', '0.11.0')\n ) THEN\n ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER;\n ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER;\n\n ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net;\n ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net;\n\n REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC;\n REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC;\n\n GRANT EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role;\n GRANT EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role;\n END IF;\n END IF;\nEND;\n$function$\n", + "config": null, + "owner": "supabase_admin", + "comment": "Grants access to pg_net", + "privileges": [ + { + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "EXECUTE", + "grantable": true + }, + { + "grantee": "dashboard_user", + "privilege": "EXECUTE", + "grantable": false + } ], - "index_expressions": null, - "partial_predicate": null, - "table_relkind": "r", - "is_owned_by_constraint": true, - "is_partitioned_index": false, - "is_index_partition": false, - "parent_index_name": null, - "definition": "CREATE UNIQUE INDEX schema_migrations_pkey ON auth.schema_migrations USING btree (version)", - "comment": null, - "owner": "supabase_auth_admin" + "security_labels": [] }, - "index:auth.users.users_pkey": { - "schema": "auth", - "table_name": "users", - "name": "users_pkey", - "storage_params": [], - "statistics_target": [ - -1 - ], - "index_type": "btree", - "tablespace": null, - "is_unique": true, - "is_primary": true, - "is_exclusion": false, - "nulls_not_distinct": false, - "immediate": true, - "is_clustered": false, - "is_replica_identity": false, - "key_columns": [ - 2 - ], - "column_collations": [ - null + "procedure:extensions.pgrst_ddl_watch()": { + "schema": "extensions", + "name": "pgrst_ddl_watch", + "kind": "f", + "return_type": "event_trigger", + "return_type_schema": "pg_catalog", + "language": "plpgsql", + "security_definer": false, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 0, + "argument_default_count": 0, + "argument_names": null, + "argument_types": [], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\nDECLARE\n cmd record;\nBEGIN\n FOR cmd IN SELECT * FROM pg_event_trigger_ddl_commands()\n LOOP\n IF cmd.command_tag IN (\n 'CREATE SCHEMA', 'ALTER SCHEMA'\n , 'CREATE TABLE', 'CREATE TABLE AS', 'SELECT INTO', 'ALTER TABLE'\n , 'CREATE FOREIGN TABLE', 'ALTER FOREIGN TABLE'\n , 'CREATE VIEW', 'ALTER VIEW'\n , 'CREATE MATERIALIZED VIEW', 'ALTER MATERIALIZED VIEW'\n , 'CREATE FUNCTION', 'ALTER FUNCTION'\n , 'CREATE TRIGGER'\n , 'CREATE TYPE', 'ALTER TYPE'\n , 'CREATE RULE'\n , 'COMMENT'\n )\n -- don't notify in case of CREATE TEMP table or other objects created on pg_temp\n AND cmd.schema_name is distinct from 'pg_temp'\n THEN\n NOTIFY pgrst, 'reload schema';\n END IF;\n END LOOP;\nEND; ", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION extensions.pgrst_ddl_watch()\n RETURNS event_trigger\n LANGUAGE plpgsql\nAS $function$\nDECLARE\n cmd record;\nBEGIN\n FOR cmd IN SELECT * FROM pg_event_trigger_ddl_commands()\n LOOP\n IF cmd.command_tag IN (\n 'CREATE SCHEMA', 'ALTER SCHEMA'\n , 'CREATE TABLE', 'CREATE TABLE AS', 'SELECT INTO', 'ALTER TABLE'\n , 'CREATE FOREIGN TABLE', 'ALTER FOREIGN TABLE'\n , 'CREATE VIEW', 'ALTER VIEW'\n , 'CREATE MATERIALIZED VIEW', 'ALTER MATERIALIZED VIEW'\n , 'CREATE FUNCTION', 'ALTER FUNCTION'\n , 'CREATE TRIGGER'\n , 'CREATE TYPE', 'ALTER TYPE'\n , 'CREATE RULE'\n , 'COMMENT'\n )\n -- don't notify in case of CREATE TEMP table or other objects created on pg_temp\n AND cmd.schema_name is distinct from 'pg_temp'\n THEN\n NOTIFY pgrst, 'reload schema';\n END IF;\n END LOOP;\nEND; $function$\n", + "config": null, + "owner": "supabase_admin", + "comment": null, + "privileges": [ + { + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "postgres", + "privilege": "EXECUTE", + "grantable": true + } ], - "operator_classes": [ - "default" + "security_labels": [] + }, + "procedure:extensions.pgrst_drop_watch()": { + "schema": "extensions", + "name": "pgrst_drop_watch", + "kind": "f", + "return_type": "event_trigger", + "return_type_schema": "pg_catalog", + "language": "plpgsql", + "security_definer": false, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 0, + "argument_default_count": 0, + "argument_names": null, + "argument_types": [], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\nDECLARE\n obj record;\nBEGIN\n FOR obj IN SELECT * FROM pg_event_trigger_dropped_objects()\n LOOP\n IF obj.object_type IN (\n 'schema'\n , 'table'\n , 'foreign table'\n , 'view'\n , 'materialized view'\n , 'function'\n , 'trigger'\n , 'type'\n , 'rule'\n )\n AND obj.is_temporary IS false -- no pg_temp objects\n THEN\n NOTIFY pgrst, 'reload schema';\n END IF;\n END LOOP;\nEND; ", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION extensions.pgrst_drop_watch()\n RETURNS event_trigger\n LANGUAGE plpgsql\nAS $function$\nDECLARE\n obj record;\nBEGIN\n FOR obj IN SELECT * FROM pg_event_trigger_dropped_objects()\n LOOP\n IF obj.object_type IN (\n 'schema'\n , 'table'\n , 'foreign table'\n , 'view'\n , 'materialized view'\n , 'function'\n , 'trigger'\n , 'type'\n , 'rule'\n )\n AND obj.is_temporary IS false -- no pg_temp objects\n THEN\n NOTIFY pgrst, 'reload schema';\n END IF;\n END LOOP;\nEND; $function$\n", + "config": null, + "owner": "supabase_admin", + "comment": null, + "privileges": [ + { + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "postgres", + "privilege": "EXECUTE", + "grantable": true + } ], - "column_options": [ - 0 + "security_labels": [] + }, + "procedure:extensions.set_graphql_placeholder()": { + "schema": "extensions", + "name": "set_graphql_placeholder", + "kind": "f", + "return_type": "event_trigger", + "return_type_schema": "pg_catalog", + "language": "plpgsql", + "security_definer": false, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 0, + "argument_default_count": 0, + "argument_names": null, + "argument_types": [], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\n DECLARE\n graphql_is_dropped bool;\n BEGIN\n graphql_is_dropped = (\n SELECT ev.schema_name = 'graphql_public'\n FROM pg_event_trigger_dropped_objects() AS ev\n WHERE ev.schema_name = 'graphql_public'\n );\n\n IF graphql_is_dropped\n THEN\n create or replace function graphql_public.graphql(\n \"operationName\" text default null,\n query text default null,\n variables jsonb default null,\n extensions jsonb default null\n )\n returns jsonb\n language plpgsql\n as $$\n DECLARE\n server_version float;\n BEGIN\n server_version = (SELECT (SPLIT_PART((select version()), ' ', 2))::float);\n\n IF server_version >= 14 THEN\n RETURN jsonb_build_object(\n 'errors', jsonb_build_array(\n jsonb_build_object(\n 'message', 'pg_graphql extension is not enabled.'\n )\n )\n );\n ELSE\n RETURN jsonb_build_object(\n 'errors', jsonb_build_array(\n jsonb_build_object(\n 'message', 'pg_graphql is only available on projects running Postgres 14 onwards.'\n )\n )\n );\n END IF;\n END;\n $$;\n END IF;\n\n END;\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION extensions.set_graphql_placeholder()\n RETURNS event_trigger\n LANGUAGE plpgsql\nAS $function$\n DECLARE\n graphql_is_dropped bool;\n BEGIN\n graphql_is_dropped = (\n SELECT ev.schema_name = 'graphql_public'\n FROM pg_event_trigger_dropped_objects() AS ev\n WHERE ev.schema_name = 'graphql_public'\n );\n\n IF graphql_is_dropped\n THEN\n create or replace function graphql_public.graphql(\n \"operationName\" text default null,\n query text default null,\n variables jsonb default null,\n extensions jsonb default null\n )\n returns jsonb\n language plpgsql\n as $$\n DECLARE\n server_version float;\n BEGIN\n server_version = (SELECT (SPLIT_PART((select version()), ' ', 2))::float);\n\n IF server_version >= 14 THEN\n RETURN jsonb_build_object(\n 'errors', jsonb_build_array(\n jsonb_build_object(\n 'message', 'pg_graphql extension is not enabled.'\n )\n )\n );\n ELSE\n RETURN jsonb_build_object(\n 'errors', jsonb_build_array(\n jsonb_build_object(\n 'message', 'pg_graphql is only available on projects running Postgres 14 onwards.'\n )\n )\n );\n END IF;\n END;\n $$;\n END IF;\n\n END;\n$function$\n", + "config": null, + "owner": "supabase_admin", + "comment": "Reintroduces placeholder function for graphql_public.graphql", + "privileges": [ + { + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "postgres", + "privilege": "EXECUTE", + "grantable": true + } ], - "index_expressions": null, - "partial_predicate": null, - "table_relkind": "r", - "is_owned_by_constraint": true, - "is_partitioned_index": false, - "is_index_partition": false, - "parent_index_name": null, - "definition": "CREATE UNIQUE INDEX users_pkey ON auth.users USING btree (id)", - "comment": null, - "owner": "supabase_auth_admin" + "security_labels": [] }, - "index:auth.users.users_instance_id_idx": { - "schema": "auth", - "table_name": "users", - "name": "users_instance_id_idx", - "storage_params": [], - "statistics_target": [ - -1 + "procedure:pgbouncer.get_auth(text)": { + "schema": "pgbouncer", + "name": "get_auth", + "kind": "f", + "return_type": "record", + "return_type_schema": "pg_catalog", + "language": "plpgsql", + "security_definer": true, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 1000, + "is_strict": false, + "leakproof": false, + "returns_set": true, + "argument_count": 1, + "argument_default_count": 0, + "argument_names": [ + "p_usename", + "username", + "password" ], - "index_type": "btree", - "tablespace": null, - "is_unique": false, - "is_primary": false, - "is_exclusion": false, - "nulls_not_distinct": false, - "immediate": true, - "is_clustered": false, - "is_replica_identity": false, - "key_columns": [ - 1 + "argument_types": [ + "text" ], - "column_collations": [ - null + "all_argument_types": [ + "text", + "text", + "text" ], - "operator_classes": [ - "default" + "argument_modes": [ + "i", + "t", + "t" ], - "column_options": [ - 0 + "argument_defaults": null, + "source_code": "\nbegin\n raise debug 'PgBouncer auth request: %', p_usename;\n\n return query\n select \n rolname::text, \n case when rolvaliduntil < now() \n then null \n else rolpassword::text \n end \n from pg_authid \n where rolname=$1 and rolcanlogin;\nend;\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION pgbouncer.get_auth(p_usename text)\n RETURNS TABLE(username text, password text)\n LANGUAGE plpgsql\n SECURITY DEFINER\n SET search_path TO ''\nAS $function$\nbegin\n raise debug 'PgBouncer auth request: %', p_usename;\n\n return query\n select \n rolname::text, \n case when rolvaliduntil < now() \n then null \n else rolpassword::text \n end \n from pg_authid \n where rolname=$1 and rolcanlogin;\nend;\n$function$\n", + "config": [ + "search_path=\"\"" ], - "index_expressions": null, - "partial_predicate": null, - "table_relkind": "r", - "is_owned_by_constraint": false, - "is_partitioned_index": false, - "is_index_partition": false, - "parent_index_name": null, - "definition": "CREATE INDEX users_instance_id_idx ON auth.users USING btree (instance_id)", + "owner": "supabase_admin", "comment": null, - "owner": "supabase_auth_admin" - }, - "index:auth.users.users_instance_id_email_idx": { - "schema": "auth", - "table_name": "users", - "name": "users_instance_id_email_idx", - "storage_params": [], - "statistics_target": [ - -1, - -1 + "privileges": [ + { + "grantee": "supabase_admin", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "pgbouncer", + "privilege": "EXECUTE", + "grantable": false + } ], - "index_type": "btree", - "tablespace": null, - "is_unique": false, - "is_primary": false, - "is_exclusion": false, - "nulls_not_distinct": false, - "immediate": true, - "is_clustered": false, - "is_replica_identity": false, - "key_columns": [ - 1, - 5 - ], - "column_collations": [ - null, - null - ], - "operator_classes": [ - "default", - "default" - ], - "column_options": [ - 0, - 0 - ], - "index_expressions": null, - "partial_predicate": null, - "table_relkind": "r", - "is_owned_by_constraint": false, - "is_partitioned_index": false, - "is_index_partition": false, - "parent_index_name": null, - "definition": "CREATE INDEX users_instance_id_email_idx ON auth.users USING btree (instance_id, email)", - "comment": null, - "owner": "supabase_auth_admin" + "security_labels": [] }, - "index:auth.users.users_email_key": { - "schema": "auth", - "table_name": "users", - "name": "users_email_key", - "storage_params": [], - "statistics_target": [ - -1 - ], - "index_type": "btree", - "tablespace": null, - "is_unique": true, - "is_primary": false, - "is_exclusion": false, - "nulls_not_distinct": false, - "immediate": true, - "is_clustered": false, - "is_replica_identity": false, - "key_columns": [ - 5 - ], - "column_collations": [ - null - ], - "operator_classes": [ - "default" - ], - "column_options": [ - 0 + "procedure:realtime.\"cast\"(text,regtype)": { + "schema": "realtime", + "name": "\"cast\"", + "kind": "f", + "return_type": "jsonb", + "return_type_schema": "pg_catalog", + "language": "plpgsql", + "security_definer": false, + "volatility": "i", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 2, + "argument_default_count": 0, + "argument_names": [ + "val", + "type_" ], - "index_expressions": null, - "partial_predicate": null, - "table_relkind": "r", - "is_owned_by_constraint": true, - "is_partitioned_index": false, - "is_index_partition": false, - "parent_index_name": null, - "definition": "CREATE UNIQUE INDEX users_email_key ON auth.users USING btree (email)", - "comment": null, - "owner": "supabase_auth_admin" - } - }, - "materializedViews": {}, - "subscriptions": {}, - "publications": { - "publication:supabase_realtime": { - "name": "supabase_realtime", - "owner": "postgres", - "comment": null, - "all_tables": false, - "publish_insert": true, - "publish_update": true, - "publish_delete": true, - "publish_truncate": true, - "publish_via_partition_root": false, - "tables": [], - "schemas": [], - "security_labels": [] - } - }, - "rlsPolicies": {}, - "roles": { - "role:anon": { - "name": "anon", - "is_superuser": false, - "can_inherit": true, - "can_create_roles": false, - "can_create_databases": false, - "can_login": false, - "can_replicate": false, - "connection_limit": -1, - "can_bypass_rls": false, - "config": [ - "statement_timeout=3s" + "argument_types": [ + "text", + "regtype" ], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\ndeclare\n res jsonb;\nbegin\n if type_::text = 'bytea' then\n return to_jsonb(val);\n end if;\n execute format('select to_jsonb(%L::'|| type_::text || ')', val) into res;\n return res;\nend\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION realtime.\"cast\"(val text, type_ regtype)\n RETURNS jsonb\n LANGUAGE plpgsql\n IMMUTABLE\nAS $function$\ndeclare\n res jsonb;\nbegin\n if type_::text = 'bytea' then\n return to_jsonb(val);\n end if;\n execute format('select to_jsonb(%L::'|| type_::text || ')', val) into res;\n return res;\nend\n$function$\n", + "config": null, + "owner": "supabase_realtime_admin", "comment": null, - "members": [ + "privileges": [ { - "member": "authenticator", - "grantor": "supabase_admin", - "admin_option": false, - "inherit_option": false, - "set_option": true + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false }, { - "member": "postgres", - "grantor": "supabase_admin", - "admin_option": true, - "inherit_option": true, - "set_option": true - } - ], - "default_privileges": [ + "grantee": "postgres", + "privilege": "EXECUTE", + "grantable": false + }, { - "in_schema": null, - "objtype": "S", "grantee": "anon", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "T", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "authenticated", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "T", - "grantee": "anon", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "service_role", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false + } + ], + "security_labels": [] + }, + "procedure:realtime.apply_rls(jsonb,integer)": { + "schema": "realtime", + "name": "apply_rls", + "kind": "f", + "return_type": "realtime.wal_rls", + "return_type_schema": "realtime", + "language": "plpgsql", + "security_definer": false, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 1000, + "is_strict": false, + "leakproof": false, + "returns_set": true, + "argument_count": 2, + "argument_default_count": 1, + "argument_names": [ + "wal", + "max_record_bytes" + ], + "argument_types": [ + "jsonb", + "integer" + ], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": "(1024 * 1024)", + "source_code": "\ndeclare\n-- Regclass of the table e.g. public.notes\nentity_ regclass = (quote_ident(wal ->> 'schema') || '.' || quote_ident(wal ->> 'table'))::regclass;\n\n-- I, U, D, T: insert, update ...\naction realtime.action = (\n case wal ->> 'action'\n when 'I' then 'INSERT'\n when 'U' then 'UPDATE'\n when 'D' then 'DELETE'\n else 'ERROR'\n end\n);\n\n-- Is row level security enabled for the table\nis_rls_enabled bool = relrowsecurity from pg_class where oid = entity_;\n\nsubscriptions realtime.subscription[] = array_agg(subs)\n from\n realtime.subscription subs\n where\n subs.entity = entity_\n -- Filter by action early - only get subscriptions interested in this action\n -- action_filter column can be: '*' (all), 'INSERT', 'UPDATE', or 'DELETE'\n and (subs.action_filter = '*' or subs.action_filter = action::text);\n\n-- Subscription vars\nroles regrole[] = array_agg(distinct us.claims_role::text)\n from\n unnest(subscriptions) us;\n\nworking_role regrole;\nclaimed_role regrole;\nclaims jsonb;\n\nsubscription_id uuid;\nsubscription_has_access bool;\nvisible_to_subscription_ids uuid[] = '{}';\n\n-- structured info for wal's columns\ncolumns realtime.wal_column[];\n-- previous identity values for update/delete\nold_columns realtime.wal_column[];\n\nerror_record_exceeds_max_size boolean = octet_length(wal::text) > max_record_bytes;\n\n-- Primary jsonb output for record\noutput jsonb;\n\nbegin\nperform set_config('role', null, true);\n\ncolumns =\n array_agg(\n (\n x->>'name',\n x->>'type',\n x->>'typeoid',\n realtime.cast(\n (x->'value') #>> '{}',\n coalesce(\n (x->>'typeoid')::regtype, -- null when wal2json version <= 2.4\n (x->>'type')::regtype\n )\n ),\n (pks ->> 'name') is not null,\n true\n )::realtime.wal_column\n )\n from\n jsonb_array_elements(wal -> 'columns') x\n left join jsonb_array_elements(wal -> 'pk') pks\n on (x ->> 'name') = (pks ->> 'name');\n\nold_columns =\n array_agg(\n (\n x->>'name',\n x->>'type',\n x->>'typeoid',\n realtime.cast(\n (x->'value') #>> '{}',\n coalesce(\n (x->>'typeoid')::regtype, -- null when wal2json version <= 2.4\n (x->>'type')::regtype\n )\n ),\n (pks ->> 'name') is not null,\n true\n )::realtime.wal_column\n )\n from\n jsonb_array_elements(wal -> 'identity') x\n left join jsonb_array_elements(wal -> 'pk') pks\n on (x ->> 'name') = (pks ->> 'name');\n\nfor working_role in select * from unnest(roles) loop\n\n -- Update `is_selectable` for columns and old_columns\n columns =\n array_agg(\n (\n c.name,\n c.type_name,\n c.type_oid,\n c.value,\n c.is_pkey,\n pg_catalog.has_column_privilege(working_role, entity_, c.name, 'SELECT')\n )::realtime.wal_column\n )\n from\n unnest(columns) c;\n\n old_columns =\n array_agg(\n (\n c.name,\n c.type_name,\n c.type_oid,\n c.value,\n c.is_pkey,\n pg_catalog.has_column_privilege(working_role, entity_, c.name, 'SELECT')\n )::realtime.wal_column\n )\n from\n unnest(old_columns) c;\n\n if action <> 'DELETE' and count(1) = 0 from unnest(columns) c where c.is_pkey then\n return next (\n jsonb_build_object(\n 'schema', wal ->> 'schema',\n 'table', wal ->> 'table',\n 'type', action\n ),\n is_rls_enabled,\n -- subscriptions is already filtered by entity\n (select array_agg(s.subscription_id) from unnest(subscriptions) as s where claims_role = working_role),\n array['Error 400: Bad Request, no primary key']\n )::realtime.wal_rls;\n\n -- The claims role does not have SELECT permission to the primary key of entity\n elsif action <> 'DELETE' and sum(c.is_selectable::int) <> count(1) from unnest(columns) c where c.is_pkey then\n return next (\n jsonb_build_object(\n 'schema', wal ->> 'schema',\n 'table', wal ->> 'table',\n 'type', action\n ),\n is_rls_enabled,\n (select array_agg(s.subscription_id) from unnest(subscriptions) as s where claims_role = working_role),\n array['Error 401: Unauthorized']\n )::realtime.wal_rls;\n\n else\n output = jsonb_build_object(\n 'schema', wal ->> 'schema',\n 'table', wal ->> 'table',\n 'type', action,\n 'commit_timestamp', to_char(\n ((wal ->> 'timestamp')::timestamptz at time zone 'utc'),\n 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"'\n ),\n 'columns', (\n select\n jsonb_agg(\n jsonb_build_object(\n 'name', pa.attname,\n 'type', pt.typname\n )\n order by pa.attnum asc\n )\n from\n pg_attribute pa\n join pg_type pt\n on pa.atttypid = pt.oid\n where\n attrelid = entity_\n and attnum > 0\n and pg_catalog.has_column_privilege(working_role, entity_, pa.attname, 'SELECT')\n )\n )\n -- Add \"record\" key for insert and update\n || case\n when action in ('INSERT', 'UPDATE') then\n jsonb_build_object(\n 'record',\n (\n select\n jsonb_object_agg(\n -- if unchanged toast, get column name and value from old record\n coalesce((c).name, (oc).name),\n case\n when (c).name is null then (oc).value\n else (c).value\n end\n )\n from\n unnest(columns) c\n full outer join unnest(old_columns) oc\n on (c).name = (oc).name\n where\n coalesce((c).is_selectable, (oc).is_selectable)\n and ( not error_record_exceeds_max_size or (octet_length((c).value::text) <= 64))\n )\n )\n else '{}'::jsonb\n end\n -- Add \"old_record\" key for update and delete\n || case\n when action = 'UPDATE' then\n jsonb_build_object(\n 'old_record',\n (\n select jsonb_object_agg((c).name, (c).value)\n from unnest(old_columns) c\n where\n (c).is_selectable\n and ( not error_record_exceeds_max_size or (octet_length((c).value::text) <= 64))\n )\n )\n when action = 'DELETE' then\n jsonb_build_object(\n 'old_record',\n (\n select jsonb_object_agg((c).name, (c).value)\n from unnest(old_columns) c\n where\n (c).is_selectable\n and ( not error_record_exceeds_max_size or (octet_length((c).value::text) <= 64))\n and ( not is_rls_enabled or (c).is_pkey ) -- if RLS enabled, we can't secure deletes so filter to pkey\n )\n )\n else '{}'::jsonb\n end;\n\n -- Create the prepared statement\n if is_rls_enabled and action <> 'DELETE' then\n if (select 1 from pg_prepared_statements where name = 'walrus_rls_stmt' limit 1) > 0 then\n deallocate walrus_rls_stmt;\n end if;\n execute realtime.build_prepared_statement_sql('walrus_rls_stmt', entity_, columns);\n end if;\n\n visible_to_subscription_ids = '{}';\n\n for subscription_id, claims in (\n select\n subs.subscription_id,\n subs.claims\n from\n unnest(subscriptions) subs\n where\n subs.entity = entity_\n and subs.claims_role = working_role\n and (\n realtime.is_visible_through_filters(columns, subs.filters)\n or (\n action = 'DELETE'\n and realtime.is_visible_through_filters(old_columns, subs.filters)\n )\n )\n ) loop\n\n if not is_rls_enabled or action = 'DELETE' then\n visible_to_subscription_ids = visible_to_subscription_ids || subscription_id;\n else\n -- Check if RLS allows the role to see the record\n perform\n -- Trim leading and trailing quotes from working_role because set_config\n -- doesn't recognize the role as valid if they are included\n set_config('role', trim(both '\"' from working_role::text), true),\n set_config('request.jwt.claims', claims::text, true);\n\n execute 'execute walrus_rls_stmt' into subscription_has_access;\n\n if subscription_has_access then\n visible_to_subscription_ids = visible_to_subscription_ids || subscription_id;\n end if;\n end if;\n end loop;\n\n perform set_config('role', null, true);\n\n return next (\n output,\n is_rls_enabled,\n visible_to_subscription_ids,\n case\n when error_record_exceeds_max_size then array['Error 413: Payload Too Large']\n else '{}'\n end\n )::realtime.wal_rls;\n\n end if;\nend loop;\n\nperform set_config('role', null, true);\nend;\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION realtime.apply_rls(wal jsonb, max_record_bytes integer DEFAULT (1024 * 1024))\n RETURNS SETOF realtime.wal_rls\n LANGUAGE plpgsql\nAS $function$\ndeclare\n-- Regclass of the table e.g. public.notes\nentity_ regclass = (quote_ident(wal ->> 'schema') || '.' || quote_ident(wal ->> 'table'))::regclass;\n\n-- I, U, D, T: insert, update ...\naction realtime.action = (\n case wal ->> 'action'\n when 'I' then 'INSERT'\n when 'U' then 'UPDATE'\n when 'D' then 'DELETE'\n else 'ERROR'\n end\n);\n\n-- Is row level security enabled for the table\nis_rls_enabled bool = relrowsecurity from pg_class where oid = entity_;\n\nsubscriptions realtime.subscription[] = array_agg(subs)\n from\n realtime.subscription subs\n where\n subs.entity = entity_\n -- Filter by action early - only get subscriptions interested in this action\n -- action_filter column can be: '*' (all), 'INSERT', 'UPDATE', or 'DELETE'\n and (subs.action_filter = '*' or subs.action_filter = action::text);\n\n-- Subscription vars\nroles regrole[] = array_agg(distinct us.claims_role::text)\n from\n unnest(subscriptions) us;\n\nworking_role regrole;\nclaimed_role regrole;\nclaims jsonb;\n\nsubscription_id uuid;\nsubscription_has_access bool;\nvisible_to_subscription_ids uuid[] = '{}';\n\n-- structured info for wal's columns\ncolumns realtime.wal_column[];\n-- previous identity values for update/delete\nold_columns realtime.wal_column[];\n\nerror_record_exceeds_max_size boolean = octet_length(wal::text) > max_record_bytes;\n\n-- Primary jsonb output for record\noutput jsonb;\n\nbegin\nperform set_config('role', null, true);\n\ncolumns =\n array_agg(\n (\n x->>'name',\n x->>'type',\n x->>'typeoid',\n realtime.cast(\n (x->'value') #>> '{}',\n coalesce(\n (x->>'typeoid')::regtype, -- null when wal2json version <= 2.4\n (x->>'type')::regtype\n )\n ),\n (pks ->> 'name') is not null,\n true\n )::realtime.wal_column\n )\n from\n jsonb_array_elements(wal -> 'columns') x\n left join jsonb_array_elements(wal -> 'pk') pks\n on (x ->> 'name') = (pks ->> 'name');\n\nold_columns =\n array_agg(\n (\n x->>'name',\n x->>'type',\n x->>'typeoid',\n realtime.cast(\n (x->'value') #>> '{}',\n coalesce(\n (x->>'typeoid')::regtype, -- null when wal2json version <= 2.4\n (x->>'type')::regtype\n )\n ),\n (pks ->> 'name') is not null,\n true\n )::realtime.wal_column\n )\n from\n jsonb_array_elements(wal -> 'identity') x\n left join jsonb_array_elements(wal -> 'pk') pks\n on (x ->> 'name') = (pks ->> 'name');\n\nfor working_role in select * from unnest(roles) loop\n\n -- Update `is_selectable` for columns and old_columns\n columns =\n array_agg(\n (\n c.name,\n c.type_name,\n c.type_oid,\n c.value,\n c.is_pkey,\n pg_catalog.has_column_privilege(working_role, entity_, c.name, 'SELECT')\n )::realtime.wal_column\n )\n from\n unnest(columns) c;\n\n old_columns =\n array_agg(\n (\n c.name,\n c.type_name,\n c.type_oid,\n c.value,\n c.is_pkey,\n pg_catalog.has_column_privilege(working_role, entity_, c.name, 'SELECT')\n )::realtime.wal_column\n )\n from\n unnest(old_columns) c;\n\n if action <> 'DELETE' and count(1) = 0 from unnest(columns) c where c.is_pkey then\n return next (\n jsonb_build_object(\n 'schema', wal ->> 'schema',\n 'table', wal ->> 'table',\n 'type', action\n ),\n is_rls_enabled,\n -- subscriptions is already filtered by entity\n (select array_agg(s.subscription_id) from unnest(subscriptions) as s where claims_role = working_role),\n array['Error 400: Bad Request, no primary key']\n )::realtime.wal_rls;\n\n -- The claims role does not have SELECT permission to the primary key of entity\n elsif action <> 'DELETE' and sum(c.is_selectable::int) <> count(1) from unnest(columns) c where c.is_pkey then\n return next (\n jsonb_build_object(\n 'schema', wal ->> 'schema',\n 'table', wal ->> 'table',\n 'type', action\n ),\n is_rls_enabled,\n (select array_agg(s.subscription_id) from unnest(subscriptions) as s where claims_role = working_role),\n array['Error 401: Unauthorized']\n )::realtime.wal_rls;\n\n else\n output = jsonb_build_object(\n 'schema', wal ->> 'schema',\n 'table', wal ->> 'table',\n 'type', action,\n 'commit_timestamp', to_char(\n ((wal ->> 'timestamp')::timestamptz at time zone 'utc'),\n 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"'\n ),\n 'columns', (\n select\n jsonb_agg(\n jsonb_build_object(\n 'name', pa.attname,\n 'type', pt.typname\n )\n order by pa.attnum asc\n )\n from\n pg_attribute pa\n join pg_type pt\n on pa.atttypid = pt.oid\n where\n attrelid = entity_\n and attnum > 0\n and pg_catalog.has_column_privilege(working_role, entity_, pa.attname, 'SELECT')\n )\n )\n -- Add \"record\" key for insert and update\n || case\n when action in ('INSERT', 'UPDATE') then\n jsonb_build_object(\n 'record',\n (\n select\n jsonb_object_agg(\n -- if unchanged toast, get column name and value from old record\n coalesce((c).name, (oc).name),\n case\n when (c).name is null then (oc).value\n else (c).value\n end\n )\n from\n unnest(columns) c\n full outer join unnest(old_columns) oc\n on (c).name = (oc).name\n where\n coalesce((c).is_selectable, (oc).is_selectable)\n and ( not error_record_exceeds_max_size or (octet_length((c).value::text) <= 64))\n )\n )\n else '{}'::jsonb\n end\n -- Add \"old_record\" key for update and delete\n || case\n when action = 'UPDATE' then\n jsonb_build_object(\n 'old_record',\n (\n select jsonb_object_agg((c).name, (c).value)\n from unnest(old_columns) c\n where\n (c).is_selectable\n and ( not error_record_exceeds_max_size or (octet_length((c).value::text) <= 64))\n )\n )\n when action = 'DELETE' then\n jsonb_build_object(\n 'old_record',\n (\n select jsonb_object_agg((c).name, (c).value)\n from unnest(old_columns) c\n where\n (c).is_selectable\n and ( not error_record_exceeds_max_size or (octet_length((c).value::text) <= 64))\n and ( not is_rls_enabled or (c).is_pkey ) -- if RLS enabled, we can't secure deletes so filter to pkey\n )\n )\n else '{}'::jsonb\n end;\n\n -- Create the prepared statement\n if is_rls_enabled and action <> 'DELETE' then\n if (select 1 from pg_prepared_statements where name = 'walrus_rls_stmt' limit 1) > 0 then\n deallocate walrus_rls_stmt;\n end if;\n execute realtime.build_prepared_statement_sql('walrus_rls_stmt', entity_, columns);\n end if;\n\n visible_to_subscription_ids = '{}';\n\n for subscription_id, claims in (\n select\n subs.subscription_id,\n subs.claims\n from\n unnest(subscriptions) subs\n where\n subs.entity = entity_\n and subs.claims_role = working_role\n and (\n realtime.is_visible_through_filters(columns, subs.filters)\n or (\n action = 'DELETE'\n and realtime.is_visible_through_filters(old_columns, subs.filters)\n )\n )\n ) loop\n\n if not is_rls_enabled or action = 'DELETE' then\n visible_to_subscription_ids = visible_to_subscription_ids || subscription_id;\n else\n -- Check if RLS allows the role to see the record\n perform\n -- Trim leading and trailing quotes from working_role because set_config\n -- doesn't recognize the role as valid if they are included\n set_config('role', trim(both '\"' from working_role::text), true),\n set_config('request.jwt.claims', claims::text, true);\n\n execute 'execute walrus_rls_stmt' into subscription_has_access;\n\n if subscription_has_access then\n visible_to_subscription_ids = visible_to_subscription_ids || subscription_id;\n end if;\n end if;\n end loop;\n\n perform set_config('role', null, true);\n\n return next (\n output,\n is_rls_enabled,\n visible_to_subscription_ids,\n case\n when error_record_exceeds_max_size then array['Error 413: Payload Too Large']\n else '{}'\n end\n )::realtime.wal_rls;\n\n end if;\nend loop;\n\nperform set_config('role', null, true);\nend;\n$function$\n", + "config": null, + "owner": "supabase_realtime_admin", + "comment": null, + "privileges": [ + { "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", - "grantee": "anon", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "n", "grantee": "anon", - "privileges": [ - { - "privilege": "CREATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "r", - "grantee": "anon", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "authenticated", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "service_role", + "privilege": "EXECUTE", + "grantable": false + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false } ], "security_labels": [] }, - "role:authenticated": { - "name": "authenticated", - "is_superuser": false, - "can_inherit": true, - "can_create_roles": false, - "can_create_databases": false, - "can_login": false, - "can_replicate": false, - "connection_limit": -1, - "can_bypass_rls": false, - "config": [ - "statement_timeout=8s" + "procedure:realtime.broadcast_changes(text,text,text,text,text,record,record,text)": { + "schema": "realtime", + "name": "broadcast_changes", + "kind": "f", + "return_type": "void", + "return_type_schema": "pg_catalog", + "language": "plpgsql", + "security_definer": false, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 8, + "argument_default_count": 1, + "argument_names": [ + "topic_name", + "event_name", + "operation", + "table_name", + "table_schema", + "new", + "old", + "level" + ], + "argument_types": [ + "text", + "text", + "text", + "text", + "text", + "record", + "record", + "text" ], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": "'ROW'::text", + "source_code": "\nDECLARE\n -- Declare a variable to hold the JSONB representation of the row\n row_data jsonb := '{}'::jsonb;\nBEGIN\n IF level = 'STATEMENT' THEN\n RAISE EXCEPTION 'function can only be triggered for each row, not for each statement';\n END IF;\n -- Check the operation type and handle accordingly\n IF operation = 'INSERT' OR operation = 'UPDATE' OR operation = 'DELETE' THEN\n row_data := jsonb_build_object('old_record', OLD, 'record', NEW, 'operation', operation, 'table', table_name, 'schema', table_schema);\n PERFORM realtime.send (row_data, event_name, topic_name);\n ELSE\n RAISE EXCEPTION 'Unexpected operation type: %', operation;\n END IF;\nEXCEPTION\n WHEN OTHERS THEN\n RAISE EXCEPTION 'Failed to process the row: %', SQLERRM;\nEND;\n\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION realtime.broadcast_changes(topic_name text, event_name text, operation text, table_name text, table_schema text, new record, old record, level text DEFAULT 'ROW'::text)\n RETURNS void\n LANGUAGE plpgsql\nAS $function$\nDECLARE\n -- Declare a variable to hold the JSONB representation of the row\n row_data jsonb := '{}'::jsonb;\nBEGIN\n IF level = 'STATEMENT' THEN\n RAISE EXCEPTION 'function can only be triggered for each row, not for each statement';\n END IF;\n -- Check the operation type and handle accordingly\n IF operation = 'INSERT' OR operation = 'UPDATE' OR operation = 'DELETE' THEN\n row_data := jsonb_build_object('old_record', OLD, 'record', NEW, 'operation', operation, 'table', table_name, 'schema', table_schema);\n PERFORM realtime.send (row_data, event_name, topic_name);\n ELSE\n RAISE EXCEPTION 'Unexpected operation type: %', operation;\n END IF;\nEXCEPTION\n WHEN OTHERS THEN\n RAISE EXCEPTION 'Failed to process the row: %', SQLERRM;\nEND;\n\n$function$\n", + "config": null, + "owner": "supabase_realtime_admin", "comment": null, - "members": [ + "privileges": [ { - "member": "authenticator", - "grantor": "supabase_admin", - "admin_option": false, - "inherit_option": false, - "set_option": true + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false }, { - "member": "postgres", - "grantor": "supabase_admin", - "admin_option": true, - "inherit_option": true, - "set_option": true + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false } ], - "default_privileges": [ - { - "in_schema": null, - "objtype": "S", - "grantee": "authenticated", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true - }, + "security_labels": [] + }, + "procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])": { + "schema": "realtime", + "name": "build_prepared_statement_sql", + "kind": "f", + "return_type": "text", + "return_type_schema": "pg_catalog", + "language": "sql", + "security_definer": false, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 3, + "argument_default_count": 0, + "argument_names": [ + "prepared_statement_name", + "entity", + "columns" + ], + "argument_types": [ + "text", + "regclass", + "realtime.wal_column[]" + ], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\n /*\n Builds a sql string that, if executed, creates a prepared statement to\n tests retrive a row from *entity* by its primary key columns.\n Example\n select realtime.build_prepared_statement_sql('public.notes', '{\"id\"}'::text[], '{\"bigint\"}'::text[])\n */\n select\n 'prepare ' || prepared_statement_name || ' as\n select\n exists(\n select\n 1\n from\n ' || entity || '\n where\n ' || string_agg(quote_ident(pkc.name) || '=' || quote_nullable(pkc.value #>> '{}') , ' and ') || '\n )'\n from\n unnest(columns) pkc\n where\n pkc.is_pkey\n group by\n entity\n ", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION realtime.build_prepared_statement_sql(prepared_statement_name text, entity regclass, columns realtime.wal_column[])\n RETURNS text\n LANGUAGE sql\nAS $function$\n /*\n Builds a sql string that, if executed, creates a prepared statement to\n tests retrive a row from *entity* by its primary key columns.\n Example\n select realtime.build_prepared_statement_sql('public.notes', '{\"id\"}'::text[], '{\"bigint\"}'::text[])\n */\n select\n 'prepare ' || prepared_statement_name || ' as\n select\n exists(\n select\n 1\n from\n ' || entity || '\n where\n ' || string_agg(quote_ident(pkc.name) || '=' || quote_nullable(pkc.value #>> '{}') , ' and ') || '\n )'\n from\n unnest(columns) pkc\n where\n pkc.is_pkey\n group by\n entity\n $function$\n", + "config": null, + "owner": "supabase_realtime_admin", + "comment": null, + "privileges": [ { - "in_schema": null, - "objtype": "T", "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "T", - "grantee": "authenticated", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "anon", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", "grantee": "authenticated", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "n", - "grantee": "authenticated", - "privileges": [ - { - "privilege": "CREATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "service_role", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "r", - "grantee": "authenticated", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false } ], "security_labels": [] }, - "role:authenticator": { - "name": "authenticator", - "is_superuser": false, - "can_inherit": false, - "can_create_roles": false, - "can_create_databases": false, - "can_login": true, - "can_replicate": false, - "connection_limit": -1, - "can_bypass_rls": false, - "config": [ - "session_preload_libraries=safeupdate", - "statement_timeout=8s", - "lock_timeout=8s" + "procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)": { + "schema": "realtime", + "name": "check_equality_op", + "kind": "f", + "return_type": "boolean", + "return_type_schema": "pg_catalog", + "language": "plpgsql", + "security_definer": false, + "volatility": "i", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 4, + "argument_default_count": 0, + "argument_names": [ + "op", + "type_", + "val_1", + "val_2" ], - "comment": null, - "members": [ - { - "member": "supabase_storage_admin", - "grantor": "supabase_admin", - "admin_option": false, - "inherit_option": false, - "set_option": true - }, - { - "member": "postgres", - "grantor": "supabase_admin", - "admin_option": true, - "inherit_option": true, - "set_option": true - } + "argument_types": [ + "realtime.equality_op", + "regtype", + "text", + "text" ], - "default_privileges": [ - { - "in_schema": null, - "objtype": "S", - "grantee": "authenticator", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true - }, + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\n /*\n Casts *val_1* and *val_2* as type *type_* and check the *op* condition for truthiness\n */\n declare\n op_symbol text = (\n case\n when op = 'eq' then '='\n when op = 'neq' then '!='\n when op = 'lt' then '<'\n when op = 'lte' then '<='\n when op = 'gt' then '>'\n when op = 'gte' then '>='\n when op = 'in' then '= any'\n else 'UNKNOWN OP'\n end\n );\n res boolean;\n begin\n execute format(\n 'select %L::'|| type_::text || ' ' || op_symbol\n || ' ( %L::'\n || (\n case\n when op = 'in' then type_::text || '[]'\n else type_::text end\n )\n || ')', val_1, val_2) into res;\n return res;\n end;\n ", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION realtime.check_equality_op(op realtime.equality_op, type_ regtype, val_1 text, val_2 text)\n RETURNS boolean\n LANGUAGE plpgsql\n IMMUTABLE\nAS $function$\n /*\n Casts *val_1* and *val_2* as type *type_* and check the *op* condition for truthiness\n */\n declare\n op_symbol text = (\n case\n when op = 'eq' then '='\n when op = 'neq' then '!='\n when op = 'lt' then '<'\n when op = 'lte' then '<='\n when op = 'gt' then '>'\n when op = 'gte' then '>='\n when op = 'in' then '= any'\n else 'UNKNOWN OP'\n end\n );\n res boolean;\n begin\n execute format(\n 'select %L::'|| type_::text || ' ' || op_symbol\n || ' ( %L::'\n || (\n case\n when op = 'in' then type_::text || '[]'\n else type_::text end\n )\n || ')', val_1, val_2) into res;\n return res;\n end;\n $function$\n", + "config": null, + "owner": "supabase_realtime_admin", + "comment": null, + "privileges": [ { - "in_schema": null, - "objtype": "T", "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "T", - "grantee": "authenticator", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "anon", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", - "grantee": "authenticator", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "authenticated", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "n", - "grantee": "authenticator", - "privileges": [ - { - "privilege": "CREATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "service_role", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "r", - "grantee": "authenticator", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false } ], "security_labels": [] }, - "role:dashboard_user": { - "name": "dashboard_user", - "is_superuser": false, - "can_inherit": true, - "can_create_roles": true, - "can_create_databases": true, - "can_login": false, - "can_replicate": true, - "connection_limit": -1, - "can_bypass_rls": false, + "procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])": { + "schema": "realtime", + "name": "is_visible_through_filters", + "kind": "f", + "return_type": "boolean", + "return_type_schema": "pg_catalog", + "language": "sql", + "security_definer": false, + "volatility": "i", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 2, + "argument_default_count": 0, + "argument_names": [ + "columns", + "filters" + ], + "argument_types": [ + "realtime.wal_column[]", + "realtime.user_defined_filter[]" + ], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\n /*\n Should the record be visible (true) or filtered out (false) after *filters* are applied\n */\n select\n -- Default to allowed when no filters present\n $2 is null -- no filters. this should not happen because subscriptions has a default\n or array_length($2, 1) is null -- array length of an empty array is null\n or bool_and(\n coalesce(\n realtime.check_equality_op(\n op:=f.op,\n type_:=coalesce(\n col.type_oid::regtype, -- null when wal2json version <= 2.4\n col.type_name::regtype\n ),\n -- cast jsonb to text\n val_1:=col.value #>> '{}',\n val_2:=f.value\n ),\n false -- if null, filter does not match\n )\n )\n from\n unnest(filters) f\n join unnest(columns) col\n on f.column_name = col.name;\n ", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION realtime.is_visible_through_filters(columns realtime.wal_column[], filters realtime.user_defined_filter[])\n RETURNS boolean\n LANGUAGE sql\n IMMUTABLE\nAS $function$\n /*\n Should the record be visible (true) or filtered out (false) after *filters* are applied\n */\n select\n -- Default to allowed when no filters present\n $2 is null -- no filters. this should not happen because subscriptions has a default\n or array_length($2, 1) is null -- array length of an empty array is null\n or bool_and(\n coalesce(\n realtime.check_equality_op(\n op:=f.op,\n type_:=coalesce(\n col.type_oid::regtype, -- null when wal2json version <= 2.4\n col.type_name::regtype\n ),\n -- cast jsonb to text\n val_1:=col.value #>> '{}',\n val_2:=f.value\n ),\n false -- if null, filter does not match\n )\n )\n from\n unnest(filters) f\n join unnest(columns) col\n on f.column_name = col.name;\n $function$\n", "config": null, + "owner": "supabase_realtime_admin", "comment": null, - "members": [], - "default_privileges": [ - { - "in_schema": null, - "objtype": "S", - "grantee": "dashboard_user", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true - }, + "privileges": [ { - "in_schema": null, - "objtype": "T", "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "T", - "grantee": "dashboard_user", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "anon", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", - "grantee": "dashboard_user", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "authenticated", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "n", - "grantee": "dashboard_user", - "privileges": [ - { - "privilege": "CREATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "service_role", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "r", - "grantee": "dashboard_user", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false } ], "security_labels": [] }, - "role:pgbouncer": { - "name": "pgbouncer", - "is_superuser": false, - "can_inherit": true, - "can_create_roles": false, - "can_create_databases": false, - "can_login": true, - "can_replicate": false, - "connection_limit": -1, - "can_bypass_rls": false, - "config": null, + "procedure:realtime.list_changes(name,name,integer,integer)": { + "schema": "realtime", + "name": "list_changes", + "kind": "f", + "return_type": "record", + "return_type_schema": "pg_catalog", + "language": "sql", + "security_definer": false, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 1000, + "is_strict": false, + "leakproof": false, + "returns_set": true, + "argument_count": 4, + "argument_default_count": 0, + "argument_names": [ + "publication", + "slot_name", + "max_changes", + "max_record_bytes", + "wal", + "is_rls_enabled", + "subscription_ids", + "errors", + "slot_changes_count" + ], + "argument_types": [ + "name", + "name", + "integer", + "integer" + ], + "all_argument_types": [ + "name", + "name", + "integer", + "integer", + "jsonb", + "boolean", + "uuid[]", + "text[]", + "bigint" + ], + "argument_modes": [ + "i", + "i", + "i", + "i", + "t", + "t", + "t", + "t", + "t" + ], + "argument_defaults": null, + "source_code": "\n WITH pub AS (\n SELECT\n concat_ws(\n ',',\n CASE WHEN bool_or(pubinsert) THEN 'insert' ELSE NULL END,\n CASE WHEN bool_or(pubupdate) THEN 'update' ELSE NULL END,\n CASE WHEN bool_or(pubdelete) THEN 'delete' ELSE NULL END\n ) AS w2j_actions,\n coalesce(\n string_agg(\n realtime.quote_wal2json(format('%I.%I', schemaname, tablename)::regclass),\n ','\n ) filter (WHERE ppt.tablename IS NOT NULL AND ppt.tablename NOT LIKE '% %'),\n ''\n ) AS w2j_add_tables\n FROM pg_publication pp\n LEFT JOIN pg_publication_tables ppt ON pp.pubname = ppt.pubname\n WHERE pp.pubname = publication\n GROUP BY pp.pubname\n LIMIT 1\n ),\n -- MATERIALIZED ensures pg_logical_slot_get_changes is called exactly once\n w2j AS MATERIALIZED (\n SELECT x.*, pub.w2j_add_tables\n FROM pub,\n pg_logical_slot_get_changes(\n slot_name, null, max_changes,\n 'include-pk', 'true',\n 'include-transaction', 'false',\n 'include-timestamp', 'true',\n 'include-type-oids', 'true',\n 'format-version', '2',\n 'actions', pub.w2j_actions,\n 'add-tables', pub.w2j_add_tables\n ) x\n ),\n -- Count raw slot entries before apply_rls/subscription filter\n slot_count AS (\n SELECT count(*)::bigint AS cnt\n FROM w2j\n WHERE w2j.w2j_add_tables <> ''\n ),\n -- Apply RLS and filter as before\n rls_filtered AS (\n SELECT xyz.wal, xyz.is_rls_enabled, xyz.subscription_ids, xyz.errors\n FROM w2j,\n realtime.apply_rls(\n wal := w2j.data::jsonb,\n max_record_bytes := max_record_bytes\n ) xyz(wal, is_rls_enabled, subscription_ids, errors)\n WHERE w2j.w2j_add_tables <> ''\n AND xyz.subscription_ids[1] IS NOT NULL\n )\n -- Real rows with slot count attached\n SELECT rf.wal, rf.is_rls_enabled, rf.subscription_ids, rf.errors, sc.cnt\n FROM rls_filtered rf, slot_count sc\n\n UNION ALL\n\n -- Sentinel row: always returned when no real rows exist so Elixir can\n -- always read slot_changes_count. Identified by wal IS NULL.\n SELECT null, null, null, null, sc.cnt\n FROM slot_count sc\n WHERE NOT EXISTS (SELECT 1 FROM rls_filtered)\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION realtime.list_changes(publication name, slot_name name, max_changes integer, max_record_bytes integer)\n RETURNS TABLE(wal jsonb, is_rls_enabled boolean, subscription_ids uuid[], errors text[], slot_changes_count bigint)\n LANGUAGE sql\n SET log_min_messages TO 'fatal'\nAS $function$\n WITH pub AS (\n SELECT\n concat_ws(\n ',',\n CASE WHEN bool_or(pubinsert) THEN 'insert' ELSE NULL END,\n CASE WHEN bool_or(pubupdate) THEN 'update' ELSE NULL END,\n CASE WHEN bool_or(pubdelete) THEN 'delete' ELSE NULL END\n ) AS w2j_actions,\n coalesce(\n string_agg(\n realtime.quote_wal2json(format('%I.%I', schemaname, tablename)::regclass),\n ','\n ) filter (WHERE ppt.tablename IS NOT NULL AND ppt.tablename NOT LIKE '% %'),\n ''\n ) AS w2j_add_tables\n FROM pg_publication pp\n LEFT JOIN pg_publication_tables ppt ON pp.pubname = ppt.pubname\n WHERE pp.pubname = publication\n GROUP BY pp.pubname\n LIMIT 1\n ),\n -- MATERIALIZED ensures pg_logical_slot_get_changes is called exactly once\n w2j AS MATERIALIZED (\n SELECT x.*, pub.w2j_add_tables\n FROM pub,\n pg_logical_slot_get_changes(\n slot_name, null, max_changes,\n 'include-pk', 'true',\n 'include-transaction', 'false',\n 'include-timestamp', 'true',\n 'include-type-oids', 'true',\n 'format-version', '2',\n 'actions', pub.w2j_actions,\n 'add-tables', pub.w2j_add_tables\n ) x\n ),\n -- Count raw slot entries before apply_rls/subscription filter\n slot_count AS (\n SELECT count(*)::bigint AS cnt\n FROM w2j\n WHERE w2j.w2j_add_tables <> ''\n ),\n -- Apply RLS and filter as before\n rls_filtered AS (\n SELECT xyz.wal, xyz.is_rls_enabled, xyz.subscription_ids, xyz.errors\n FROM w2j,\n realtime.apply_rls(\n wal := w2j.data::jsonb,\n max_record_bytes := max_record_bytes\n ) xyz(wal, is_rls_enabled, subscription_ids, errors)\n WHERE w2j.w2j_add_tables <> ''\n AND xyz.subscription_ids[1] IS NOT NULL\n )\n -- Real rows with slot count attached\n SELECT rf.wal, rf.is_rls_enabled, rf.subscription_ids, rf.errors, sc.cnt\n FROM rls_filtered rf, slot_count sc\n\n UNION ALL\n\n -- Sentinel row: always returned when no real rows exist so Elixir can\n -- always read slot_changes_count. Identified by wal IS NULL.\n SELECT null, null, null, null, sc.cnt\n FROM slot_count sc\n WHERE NOT EXISTS (SELECT 1 FROM rls_filtered)\n$function$\n", + "config": [ + "log_min_messages=fatal" + ], + "owner": "supabase_realtime_admin", "comment": null, - "members": [], - "default_privileges": [ + "privileges": [ { - "in_schema": null, - "objtype": "S", - "grantee": "pgbouncer", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "T", + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false + } + ], + "security_labels": [] + }, + "procedure:realtime.quote_wal2json(regclass)": { + "schema": "realtime", + "name": "quote_wal2json", + "kind": "f", + "return_type": "text", + "return_type_schema": "pg_catalog", + "language": "sql", + "security_definer": false, + "volatility": "i", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": true, + "leakproof": false, + "returns_set": false, + "argument_count": 1, + "argument_default_count": 0, + "argument_names": [ + "entity" + ], + "argument_types": [ + "regclass" + ], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\n select\n (\n select string_agg('' || ch,'')\n from unnest(string_to_array(nsp.nspname::text, null)) with ordinality x(ch, idx)\n where\n not (x.idx = 1 and x.ch = '\"')\n and not (\n x.idx = array_length(string_to_array(nsp.nspname::text, null), 1)\n and x.ch = '\"'\n )\n )\n || '.'\n || (\n select string_agg('' || ch,'')\n from unnest(string_to_array(pc.relname::text, null)) with ordinality x(ch, idx)\n where\n not (x.idx = 1 and x.ch = '\"')\n and not (\n x.idx = array_length(string_to_array(nsp.nspname::text, null), 1)\n and x.ch = '\"'\n )\n )\n from\n pg_class pc\n join pg_namespace nsp\n on pc.relnamespace = nsp.oid\n where\n pc.oid = entity\n ", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION realtime.quote_wal2json(entity regclass)\n RETURNS text\n LANGUAGE sql\n IMMUTABLE STRICT\nAS $function$\n select\n (\n select string_agg('' || ch,'')\n from unnest(string_to_array(nsp.nspname::text, null)) with ordinality x(ch, idx)\n where\n not (x.idx = 1 and x.ch = '\"')\n and not (\n x.idx = array_length(string_to_array(nsp.nspname::text, null), 1)\n and x.ch = '\"'\n )\n )\n || '.'\n || (\n select string_agg('' || ch,'')\n from unnest(string_to_array(pc.relname::text, null)) with ordinality x(ch, idx)\n where\n not (x.idx = 1 and x.ch = '\"')\n and not (\n x.idx = array_length(string_to_array(nsp.nspname::text, null), 1)\n and x.ch = '\"'\n )\n )\n from\n pg_class pc\n join pg_namespace nsp\n on pc.relnamespace = nsp.oid\n where\n pc.oid = entity\n $function$\n", + "config": null, + "owner": "supabase_realtime_admin", + "comment": null, + "privileges": [ + { "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "T", - "grantee": "pgbouncer", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "anon", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", - "grantee": "pgbouncer", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "authenticated", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "n", - "grantee": "pgbouncer", - "privileges": [ - { - "privilege": "CREATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "service_role", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "r", - "grantee": "pgbouncer", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false } ], "security_labels": [] }, - "role:postgres": { - "name": "postgres", - "is_superuser": false, - "can_inherit": true, - "can_create_roles": true, - "can_create_databases": true, - "can_login": true, - "can_replicate": true, - "connection_limit": -1, - "can_bypass_rls": true, - "config": [ - "search_path=\"\\$user\", public, extensions" + "procedure:realtime.send(jsonb,text,text,boolean)": { + "schema": "realtime", + "name": "send", + "kind": "f", + "return_type": "void", + "return_type_schema": "pg_catalog", + "language": "plpgsql", + "security_definer": false, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 4, + "argument_default_count": 1, + "argument_names": [ + "payload", + "event", + "topic", + "private" + ], + "argument_types": [ + "jsonb", + "text", + "text", + "boolean" ], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": "true", + "source_code": "\nDECLARE\n generated_id uuid;\n final_payload jsonb;\nBEGIN\n BEGIN\n -- Generate a new UUID for the id\n generated_id := gen_random_uuid();\n\n -- Check if payload has an 'id' key, if not, add the generated UUID\n IF payload ? 'id' THEN\n final_payload := payload;\n ELSE\n final_payload := jsonb_set(payload, '{id}', to_jsonb(generated_id));\n END IF;\n\n -- Set the topic configuration\n EXECUTE format('SET LOCAL realtime.topic TO %L', topic);\n\n -- Attempt to insert the message\n INSERT INTO realtime.messages (id, payload, event, topic, private, extension)\n VALUES (generated_id, final_payload, event, topic, private, 'broadcast');\n EXCEPTION\n WHEN OTHERS THEN\n -- Capture and notify the error\n RAISE WARNING 'ErrorSendingBroadcastMessage: %', SQLERRM;\n END;\nEND;\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION realtime.send(payload jsonb, event text, topic text, private boolean DEFAULT true)\n RETURNS void\n LANGUAGE plpgsql\nAS $function$\nDECLARE\n generated_id uuid;\n final_payload jsonb;\nBEGIN\n BEGIN\n -- Generate a new UUID for the id\n generated_id := gen_random_uuid();\n\n -- Check if payload has an 'id' key, if not, add the generated UUID\n IF payload ? 'id' THEN\n final_payload := payload;\n ELSE\n final_payload := jsonb_set(payload, '{id}', to_jsonb(generated_id));\n END IF;\n\n -- Set the topic configuration\n EXECUTE format('SET LOCAL realtime.topic TO %L', topic);\n\n -- Attempt to insert the message\n INSERT INTO realtime.messages (id, payload, event, topic, private, extension)\n VALUES (generated_id, final_payload, event, topic, private, 'broadcast');\n EXCEPTION\n WHEN OTHERS THEN\n -- Capture and notify the error\n RAISE WARNING 'ErrorSendingBroadcastMessage: %', SQLERRM;\n END;\nEND;\n$function$\n", + "config": null, + "owner": "supabase_realtime_admin", "comment": null, - "members": [], - "default_privileges": [ + "privileges": [ { - "in_schema": null, - "objtype": "S", - "grantee": "postgres", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "T", + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false + } + ], + "security_labels": [] + }, + "procedure:realtime.subscription_check_filters()": { + "schema": "realtime", + "name": "subscription_check_filters", + "kind": "f", + "return_type": "trigger", + "return_type_schema": "pg_catalog", + "language": "plpgsql", + "security_definer": false, + "volatility": "v", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 0, + "argument_default_count": 0, + "argument_names": null, + "argument_types": [], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\ndeclare\n col_names text[] = coalesce(\n array_agg(a.attname order by a.attnum),\n '{}'::text[]\n )\n from\n pg_catalog.pg_attribute a\n where\n a.attrelid = new.entity\n and a.attnum > 0\n and not a.attisdropped\n and pg_catalog.has_column_privilege(\n (new.claims ->> 'role'),\n a.attrelid,\n a.attnum,\n 'SELECT'\n );\n filter realtime.user_defined_filter;\n col_type regtype;\n\n in_val jsonb;\nbegin\n for filter in select * from unnest(new.filters) loop\n if not filter.column_name = any(col_names) then\n raise exception 'invalid column for filter %', filter.column_name;\n end if;\n\n col_type = (\n select atttypid::regtype\n from pg_catalog.pg_attribute\n where attrelid = new.entity\n and attname = filter.column_name\n );\n if col_type is null then\n raise exception 'failed to lookup type for column %', filter.column_name;\n end if;\n\n if filter.op = 'in'::realtime.equality_op then\n in_val = realtime.cast(filter.value, (col_type::text || '[]')::regtype);\n if coalesce(jsonb_array_length(in_val), 0) > 100 then\n raise exception 'too many values for `in` filter. Maximum 100';\n end if;\n else\n perform realtime.cast(filter.value, col_type);\n end if;\n end loop;\n\n new.filters = coalesce(\n array_agg(f order by f.column_name, f.op, f.value),\n '{}'\n ) from unnest(new.filters) f;\n\n return new;\nend;\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION realtime.subscription_check_filters()\n RETURNS trigger\n LANGUAGE plpgsql\nAS $function$\ndeclare\n col_names text[] = coalesce(\n array_agg(a.attname order by a.attnum),\n '{}'::text[]\n )\n from\n pg_catalog.pg_attribute a\n where\n a.attrelid = new.entity\n and a.attnum > 0\n and not a.attisdropped\n and pg_catalog.has_column_privilege(\n (new.claims ->> 'role'),\n a.attrelid,\n a.attnum,\n 'SELECT'\n );\n filter realtime.user_defined_filter;\n col_type regtype;\n\n in_val jsonb;\nbegin\n for filter in select * from unnest(new.filters) loop\n if not filter.column_name = any(col_names) then\n raise exception 'invalid column for filter %', filter.column_name;\n end if;\n\n col_type = (\n select atttypid::regtype\n from pg_catalog.pg_attribute\n where attrelid = new.entity\n and attname = filter.column_name\n );\n if col_type is null then\n raise exception 'failed to lookup type for column %', filter.column_name;\n end if;\n\n if filter.op = 'in'::realtime.equality_op then\n in_val = realtime.cast(filter.value, (col_type::text || '[]')::regtype);\n if coalesce(jsonb_array_length(in_val), 0) > 100 then\n raise exception 'too many values for `in` filter. Maximum 100';\n end if;\n else\n perform realtime.cast(filter.value, col_type);\n end if;\n end loop;\n\n new.filters = coalesce(\n array_agg(f order by f.column_name, f.op, f.value),\n '{}'\n ) from unnest(new.filters) f;\n\n return new;\nend;\n$function$\n", + "config": null, + "owner": "supabase_realtime_admin", + "comment": null, + "privileges": [ + { "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "T", "grantee": "postgres", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "anon", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", - "grantee": "postgres", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "authenticated", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "n", - "grantee": "postgres", - "privileges": [ - { - "privilege": "CREATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "service_role", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": null, - "objtype": "r", - "grantee": "postgres", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false + } + ], + "security_labels": [] + }, + "procedure:realtime.to_regrole(text)": { + "schema": "realtime", + "name": "to_regrole", + "kind": "f", + "return_type": "regrole", + "return_type_schema": "pg_catalog", + "language": "sql", + "security_definer": false, + "volatility": "i", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 1, + "argument_default_count": 0, + "argument_names": [ + "role_name" + ], + "argument_types": [ + "text" + ], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": " select role_name::regrole ", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION realtime.to_regrole(role_name text)\n RETURNS regrole\n LANGUAGE sql\n IMMUTABLE\nAS $function$ select role_name::regrole $function$\n", + "config": null, + "owner": "supabase_realtime_admin", + "comment": null, + "privileges": [ + { + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": "public", - "objtype": "S", "grantee": "postgres", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": "public", - "objtype": "S", "grantee": "anon", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": "public", - "objtype": "S", "grantee": "authenticated", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false - }, - { - "in_schema": "public", - "objtype": "S", - "grantee": "service_role", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false - }, - { - "in_schema": "public", - "objtype": "f", - "grantee": "postgres", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false - }, - { - "in_schema": "public", - "objtype": "f", - "grantee": "anon", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false - }, - { - "in_schema": "public", - "objtype": "f", - "grantee": "authenticated", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": "public", - "objtype": "f", "grantee": "service_role", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false - }, - { - "in_schema": "public", - "objtype": "r", - "grantee": "postgres", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": "public", - "objtype": "r", - "grantee": "anon", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false - }, + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false + } + ], + "security_labels": [] + }, + "procedure:realtime.topic()": { + "schema": "realtime", + "name": "topic", + "kind": "f", + "return_type": "text", + "return_type_schema": "pg_catalog", + "language": "sql", + "security_definer": false, + "volatility": "s", + "parallel_safety": "u", + "execution_cost": 100, + "result_rows": 0, + "is_strict": false, + "leakproof": false, + "returns_set": false, + "argument_count": 0, + "argument_default_count": 0, + "argument_names": null, + "argument_types": [], + "all_argument_types": [], + "argument_modes": null, + "argument_defaults": null, + "source_code": "\nselect nullif(current_setting('realtime.topic', true), '')::text;\n", + "binary_path": null, + "sql_body": null, + "definition": "CREATE OR REPLACE FUNCTION realtime.topic()\n RETURNS text\n LANGUAGE sql\n STABLE\nAS $function$\nselect nullif(current_setting('realtime.topic', true), '')::text;\n$function$\n", + "config": null, + "owner": "supabase_realtime_admin", + "comment": null, + "privileges": [ { - "in_schema": "public", - "objtype": "r", - "grantee": "authenticated", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "PUBLIC", + "privilege": "EXECUTE", + "grantable": false }, { - "in_schema": "public", - "objtype": "r", - "grantee": "service_role", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", + "grantee": "supabase_realtime_admin", + "privilege": "EXECUTE", + "grantable": false + } + ], + "security_labels": [] + } + }, + "indexes": { + "index:auth.audit_log_entries.audit_log_entries_pkey": { + "schema": "auth", + "table_name": "audit_log_entries", + "name": "audit_log_entries_pkey", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": true, + "is_primary": true, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 2 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": true, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE UNIQUE INDEX audit_log_entries_pkey ON auth.audit_log_entries USING btree (id)", + "comment": null, + "owner": "supabase_auth_admin" + }, + "index:auth.audit_log_entries.audit_logs_instance_id_idx": { + "schema": "auth", + "table_name": "audit_log_entries", + "name": "audit_logs_instance_id_idx", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": false, + "is_primary": false, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 1 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": false, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE INDEX audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id)", + "comment": null, + "owner": "supabase_auth_admin" + }, + "index:auth.instances.instances_pkey": { + "schema": "auth", + "table_name": "instances", + "name": "instances_pkey", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": true, + "is_primary": true, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 1 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": true, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE UNIQUE INDEX instances_pkey ON auth.instances USING btree (id)", + "comment": null, + "owner": "supabase_auth_admin" + }, + "index:auth.refresh_tokens.refresh_tokens_pkey": { + "schema": "auth", + "table_name": "refresh_tokens", + "name": "refresh_tokens_pkey", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": true, + "is_primary": true, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 2 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": true, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE UNIQUE INDEX refresh_tokens_pkey ON auth.refresh_tokens USING btree (id)", + "comment": null, + "owner": "supabase_auth_admin" + }, + "index:auth.refresh_tokens.refresh_tokens_token_idx": { + "schema": "auth", + "table_name": "refresh_tokens", + "name": "refresh_tokens_token_idx", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": false, + "is_primary": false, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 3 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": false, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE INDEX refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token)", + "comment": null, + "owner": "supabase_auth_admin" + }, + "index:auth.refresh_tokens.refresh_tokens_instance_id_user_id_idx": { + "schema": "auth", + "table_name": "refresh_tokens", + "name": "refresh_tokens_instance_id_user_id_idx", + "storage_params": [], + "statistics_target": [ + -1, + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": false, + "is_primary": false, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 1, + 4 + ], + "column_collations": [ + null, + null + ], + "operator_classes": [ + "default", + "default" + ], + "column_options": [ + 0, + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": false, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE INDEX refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id)", + "comment": null, + "owner": "supabase_auth_admin" + }, + "index:auth.refresh_tokens.refresh_tokens_instance_id_idx": { + "schema": "auth", + "table_name": "refresh_tokens", + "name": "refresh_tokens_instance_id_idx", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": false, + "is_primary": false, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 1 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": false, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE INDEX refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id)", + "comment": null, + "owner": "supabase_auth_admin" + }, + "index:auth.schema_migrations.schema_migrations_pkey": { + "schema": "auth", + "table_name": "schema_migrations", + "name": "schema_migrations_pkey", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": true, + "is_primary": true, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 1 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": true, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE UNIQUE INDEX schema_migrations_pkey ON auth.schema_migrations USING btree (version)", + "comment": null, + "owner": "supabase_auth_admin" + }, + "index:auth.users.users_pkey": { + "schema": "auth", + "table_name": "users", + "name": "users_pkey", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": true, + "is_primary": true, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 2 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": true, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE UNIQUE INDEX users_pkey ON auth.users USING btree (id)", + "comment": null, + "owner": "supabase_auth_admin" + }, + "index:auth.users.users_email_key": { + "schema": "auth", + "table_name": "users", + "name": "users_email_key", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": true, + "is_primary": false, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 5 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": true, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE UNIQUE INDEX users_email_key ON auth.users USING btree (email)", + "comment": null, + "owner": "supabase_auth_admin" + }, + "index:auth.users.users_instance_id_email_idx": { + "schema": "auth", + "table_name": "users", + "name": "users_instance_id_email_idx", + "storage_params": [], + "statistics_target": [ + -1, + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": false, + "is_primary": false, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 1, + 5 + ], + "column_collations": [ + null, + null + ], + "operator_classes": [ + "default", + "default" + ], + "column_options": [ + 0, + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": false, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE INDEX users_instance_id_email_idx ON auth.users USING btree (instance_id, email)", + "comment": null, + "owner": "supabase_auth_admin" + }, + "index:auth.users.users_instance_id_idx": { + "schema": "auth", + "table_name": "users", + "name": "users_instance_id_idx", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": false, + "is_primary": false, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 1 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": false, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE INDEX users_instance_id_idx ON auth.users USING btree (instance_id)", + "comment": null, + "owner": "supabase_auth_admin" + }, + "index:public.test_tenant.test_tenant_pkey": { + "schema": "public", + "table_name": "test_tenant", + "name": "test_tenant_pkey", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": true, + "is_primary": true, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 1 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": true, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE UNIQUE INDEX test_tenant_pkey ON public.test_tenant USING btree (id)", + "comment": null, + "owner": "supabase_admin" + }, + "index:realtime.messages.messages_pkey": { + "schema": "realtime", + "table_name": "messages", + "name": "messages_pkey", + "storage_params": [], + "statistics_target": [ + -1, + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": true, + "is_primary": true, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 10, + 9 + ], + "column_collations": [ + null, + null + ], + "operator_classes": [ + "default", + "default" + ], + "column_options": [ + 0, + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "p", + "is_owned_by_constraint": true, + "is_partitioned_index": true, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE UNIQUE INDEX messages_pkey ON ONLY realtime.messages USING btree (id, inserted_at)", + "comment": null, + "owner": "supabase_realtime_admin" + }, + "index:realtime.messages.messages_inserted_at_topic_index": { + "schema": "realtime", + "table_name": "messages", + "name": "messages_inserted_at_topic_index", + "storage_params": [], + "statistics_target": [ + -1, + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": false, + "is_primary": false, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 9, + 3 + ], + "column_collations": [ + null, + null + ], + "operator_classes": [ + "default", + "default" + ], + "column_options": [ + 3, + 0 + ], + "index_expressions": null, + "partial_predicate": "((extension = 'broadcast'::text) AND (private IS TRUE))", + "table_relkind": "p", + "is_owned_by_constraint": false, + "is_partitioned_index": true, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE INDEX messages_inserted_at_topic_index ON ONLY realtime.messages USING btree (inserted_at DESC, topic) WHERE extension = 'broadcast'::text AND private IS TRUE", + "comment": null, + "owner": "supabase_realtime_admin" + }, + "index:realtime.schema_migrations.schema_migrations_pkey": { + "schema": "realtime", + "table_name": "schema_migrations", + "name": "schema_migrations_pkey", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": true, + "is_primary": true, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 1 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": true, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE UNIQUE INDEX schema_migrations_pkey ON realtime.schema_migrations USING btree (version)", + "comment": null, + "owner": "supabase_realtime_admin" + }, + "index:realtime.subscription.pk_subscription": { + "schema": "realtime", + "table_name": "subscription", + "name": "pk_subscription", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": true, + "is_primary": true, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 1 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": true, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE UNIQUE INDEX pk_subscription ON realtime.subscription USING btree (id)", + "comment": null, + "owner": "supabase_realtime_admin" + }, + "index:realtime.subscription.ix_realtime_subscription_entity": { + "schema": "realtime", + "table_name": "subscription", + "name": "ix_realtime_subscription_entity", + "storage_params": [], + "statistics_target": [ + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": false, + "is_primary": false, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 4 + ], + "column_collations": [ + null + ], + "operator_classes": [ + "default" + ], + "column_options": [ + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": false, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE INDEX ix_realtime_subscription_entity ON realtime.subscription USING btree (entity)", + "comment": null, + "owner": "supabase_realtime_admin" + }, + "index:realtime.subscription.subscription_subscription_id_entity_filters_action_filter_key": { + "schema": "realtime", + "table_name": "subscription", + "name": "subscription_subscription_id_entity_filters_action_filter_key", + "storage_params": [], + "statistics_target": [ + -1, + -1, + -1, + -1 + ], + "index_type": "btree", + "tablespace": null, + "is_unique": true, + "is_primary": false, + "is_exclusion": false, + "nulls_not_distinct": false, + "immediate": true, + "is_clustered": false, + "is_replica_identity": false, + "key_columns": [ + 2, + 4, + 5, + 10 + ], + "column_collations": [ + null, + null, + null, + null + ], + "operator_classes": [ + "default", + "default", + "pg_catalog.array_ops", + "default" + ], + "column_options": [ + 0, + 0, + 0, + 0 + ], + "index_expressions": null, + "partial_predicate": null, + "table_relkind": "r", + "is_owned_by_constraint": false, + "is_partitioned_index": false, + "is_index_partition": false, + "parent_index_name": null, + "definition": "CREATE UNIQUE INDEX subscription_subscription_id_entity_filters_action_filter_key ON realtime.subscription USING btree (subscription_id, entity, filters, action_filter)", + "comment": null, + "owner": "supabase_realtime_admin" + } + }, + "materializedViews": {}, + "subscriptions": {}, + "publications": { + "publication:supabase_realtime": { + "name": "supabase_realtime", + "owner": "supabase_admin", + "comment": null, + "all_tables": false, + "publish_insert": true, + "publish_update": true, + "publish_delete": true, + "publish_truncate": true, + "publish_via_partition_root": false, + "tables": [ + { + "schema": "public", + "name": "test_tenant", + "columns": null, + "row_filter": null + } + ], + "schemas": [], + "security_labels": [] + } + }, + "rlsPolicies": {}, + "roles": { + "role:anon": { + "name": "anon", + "is_superuser": false, + "can_inherit": true, + "can_create_roles": false, + "can_create_databases": false, + "can_login": false, + "can_replicate": false, + "connection_limit": -1, + "can_bypass_rls": false, + "config": [ + "statement_timeout=3s" + ], + "comment": null, + "members": [ + { + "member": "supabase_realtime_admin", + "grantor": "supabase_admin", + "admin_option": false, + "inherit_option": false, + "set_option": true + }, + { + "member": "authenticator", + "grantor": "supabase_admin", + "admin_option": false, + "inherit_option": false, + "set_option": true + }, + { + "member": "postgres", + "grantor": "supabase_admin", + "admin_option": true, + "inherit_option": true, + "set_option": true + } + ], + "default_privileges": [ + { + "in_schema": null, + "objtype": "S", + "grantee": "anon", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "anon", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "anon", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "n", + "grantee": "anon", + "privileges": [ + { + "privilege": "CREATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "r", + "grantee": "anon", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": true + } + ], + "security_labels": [] + }, + "role:authenticated": { + "name": "authenticated", + "is_superuser": false, + "can_inherit": true, + "can_create_roles": false, + "can_create_databases": false, + "can_login": false, + "can_replicate": false, + "connection_limit": -1, + "can_bypass_rls": false, + "config": [ + "statement_timeout=8s" + ], + "comment": null, + "members": [ + { + "member": "supabase_realtime_admin", + "grantor": "supabase_admin", + "admin_option": false, + "inherit_option": false, + "set_option": true + }, + { + "member": "authenticator", + "grantor": "supabase_admin", + "admin_option": false, + "inherit_option": false, + "set_option": true + }, + { + "member": "postgres", + "grantor": "supabase_admin", + "admin_option": true, + "inherit_option": true, + "set_option": true + } + ], + "default_privileges": [ + { + "in_schema": null, + "objtype": "S", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "n", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "CREATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "r", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": true + } + ], + "security_labels": [] + }, + "role:authenticator": { + "name": "authenticator", + "is_superuser": false, + "can_inherit": false, + "can_create_roles": false, + "can_create_databases": false, + "can_login": true, + "can_replicate": false, + "connection_limit": -1, + "can_bypass_rls": false, + "config": [ + "session_preload_libraries=safeupdate", + "statement_timeout=8s", + "lock_timeout=8s" + ], + "comment": null, + "members": [ + { + "member": "supabase_storage_admin", + "grantor": "supabase_admin", + "admin_option": false, + "inherit_option": false, + "set_option": true + }, + { + "member": "postgres", + "grantor": "supabase_admin", + "admin_option": true, + "inherit_option": true, + "set_option": true + } + ], + "default_privileges": [ + { + "in_schema": null, + "objtype": "S", + "grantee": "authenticator", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "authenticator", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "authenticator", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "n", + "grantee": "authenticator", + "privileges": [ + { + "privilege": "CREATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "r", + "grantee": "authenticator", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": true + } + ], + "security_labels": [] + }, + "role:dashboard_user": { + "name": "dashboard_user", + "is_superuser": false, + "can_inherit": true, + "can_create_roles": true, + "can_create_databases": true, + "can_login": false, + "can_replicate": true, + "connection_limit": -1, + "can_bypass_rls": false, + "config": null, + "comment": null, + "members": [], + "default_privileges": [ + { + "in_schema": null, + "objtype": "S", + "grantee": "dashboard_user", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "dashboard_user", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "dashboard_user", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "n", + "grantee": "dashboard_user", + "privileges": [ + { + "privilege": "CREATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "r", + "grantee": "dashboard_user", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": true + } + ], + "security_labels": [] + }, + "role:pgbouncer": { + "name": "pgbouncer", + "is_superuser": false, + "can_inherit": true, + "can_create_roles": false, + "can_create_databases": false, + "can_login": true, + "can_replicate": false, + "connection_limit": -1, + "can_bypass_rls": false, + "config": null, + "comment": null, + "members": [], + "default_privileges": [ + { + "in_schema": null, + "objtype": "S", + "grantee": "pgbouncer", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "pgbouncer", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "pgbouncer", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "n", + "grantee": "pgbouncer", + "privileges": [ + { + "privilege": "CREATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "r", + "grantee": "pgbouncer", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": true + } + ], + "security_labels": [] + }, + "role:postgres": { + "name": "postgres", + "is_superuser": false, + "can_inherit": true, + "can_create_roles": true, + "can_create_databases": true, + "can_login": true, + "can_replicate": true, + "connection_limit": -1, + "can_bypass_rls": true, + "config": [ + "search_path=\"\\$user\", public, extensions" + ], + "comment": null, + "members": [], + "default_privileges": [ + { + "in_schema": null, + "objtype": "S", + "grantee": "postgres", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "postgres", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "postgres", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "n", + "grantee": "postgres", + "privileges": [ + { + "privilege": "CREATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "r", + "grantee": "postgres", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": "public", + "objtype": "S", + "grantee": "postgres", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "S", + "grantee": "anon", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "S", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "S", + "grantee": "service_role", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "f", + "grantee": "postgres", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "f", + "grantee": "anon", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "f", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "f", + "grantee": "service_role", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "r", + "grantee": "postgres", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "r", + "grantee": "anon", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "r", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "r", + "grantee": "service_role", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "storage", + "objtype": "S", + "grantee": "postgres", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "storage", + "objtype": "S", + "grantee": "anon", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "storage", + "objtype": "S", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "storage", + "objtype": "S", + "grantee": "service_role", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "storage", + "objtype": "f", + "grantee": "postgres", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "storage", + "objtype": "f", + "grantee": "anon", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "storage", + "objtype": "f", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "storage", + "objtype": "f", + "grantee": "service_role", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "storage", + "objtype": "r", + "grantee": "postgres", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "storage", + "objtype": "r", + "grantee": "anon", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "storage", + "objtype": "r", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "storage", + "objtype": "r", + "grantee": "service_role", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + } + ], + "security_labels": [] + }, + "role:service_role": { + "name": "service_role", + "is_superuser": false, + "can_inherit": true, + "can_create_roles": false, + "can_create_databases": false, + "can_login": false, + "can_replicate": false, + "connection_limit": -1, + "can_bypass_rls": true, + "config": null, + "comment": null, + "members": [ + { + "member": "supabase_realtime_admin", + "grantor": "supabase_admin", + "admin_option": false, + "inherit_option": false, + "set_option": true + }, + { + "member": "authenticator", + "grantor": "supabase_admin", + "admin_option": false, + "inherit_option": false, + "set_option": true + }, + { + "member": "postgres", + "grantor": "supabase_admin", + "admin_option": true, + "inherit_option": true, + "set_option": true + } + ], + "default_privileges": [ + { + "in_schema": null, + "objtype": "S", + "grantee": "service_role", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "service_role", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "service_role", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "n", + "grantee": "service_role", + "privileges": [ + { + "privilege": "CREATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "r", + "grantee": "service_role", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": true + } + ], + "security_labels": [] + }, + "role:supabase_admin": { + "name": "supabase_admin", + "is_superuser": true, + "can_inherit": true, + "can_create_roles": true, + "can_create_databases": true, + "can_login": true, + "can_replicate": true, + "connection_limit": -1, + "can_bypass_rls": true, + "config": [ + "search_path=\"\\$user\", public, auth, extensions", + "log_statement=none" + ], + "comment": null, + "members": [], + "default_privileges": [ + { + "in_schema": null, + "objtype": "S", + "grantee": "supabase_admin", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "supabase_admin", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "supabase_admin", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "n", + "grantee": "supabase_admin", + "privileges": [ + { + "privilege": "CREATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "r", + "grantee": "supabase_admin", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": "public", + "objtype": "S", + "grantee": "postgres", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "S", + "grantee": "anon", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "S", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "S", + "grantee": "service_role", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "f", + "grantee": "postgres", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "f", + "grantee": "anon", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "f", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "f", + "grantee": "service_role", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "r", + "grantee": "postgres", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "r", + "grantee": "anon", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "r", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "public", + "objtype": "r", + "grantee": "service_role", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "extensions", + "objtype": "S", + "grantee": "postgres", + "privileges": [ + { + "privilege": "SELECT", + "grantable": true + }, + { + "privilege": "UPDATE", + "grantable": true + }, + { + "privilege": "USAGE", + "grantable": true + } + ], + "is_implicit": false + }, + { + "in_schema": "extensions", + "objtype": "f", + "grantee": "postgres", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": true + } + ], + "is_implicit": false + }, + { + "in_schema": "extensions", + "objtype": "r", + "grantee": "postgres", + "privileges": [ + { + "privilege": "DELETE", + "grantable": true + }, + { + "privilege": "INSERT", + "grantable": true + }, + { + "privilege": "MAINTAIN", + "grantable": true + }, + { + "privilege": "REFERENCES", + "grantable": true + }, + { + "privilege": "SELECT", + "grantable": true + }, + { + "privilege": "TRIGGER", + "grantable": true + }, + { + "privilege": "TRUNCATE", + "grantable": true + }, + { + "privilege": "UPDATE", + "grantable": true + } + ], + "is_implicit": false + }, + { + "in_schema": "realtime", + "objtype": "S", + "grantee": "postgres", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "realtime", + "objtype": "S", + "grantee": "dashboard_user", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "realtime", + "objtype": "f", + "grantee": "postgres", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "realtime", + "objtype": "f", + "grantee": "dashboard_user", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "realtime", + "objtype": "r", + "grantee": "postgres", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "realtime", + "objtype": "r", + "grantee": "dashboard_user", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql_public", + "objtype": "S", + "grantee": "postgres", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql_public", + "objtype": "S", + "grantee": "anon", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql_public", + "objtype": "S", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql_public", + "objtype": "S", + "grantee": "service_role", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql_public", + "objtype": "f", + "grantee": "postgres", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql_public", + "objtype": "f", + "grantee": "anon", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql_public", + "objtype": "f", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql_public", + "objtype": "f", + "grantee": "service_role", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql_public", + "objtype": "r", + "grantee": "postgres", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql_public", + "objtype": "r", + "grantee": "anon", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql_public", + "objtype": "r", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql_public", + "objtype": "r", + "grantee": "service_role", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql", + "objtype": "S", + "grantee": "postgres", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql", + "objtype": "S", + "grantee": "anon", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql", + "objtype": "S", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql", + "objtype": "S", + "grantee": "service_role", + "privileges": [ + { + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql", + "objtype": "f", + "grantee": "postgres", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql", + "objtype": "f", + "grantee": "anon", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql", + "objtype": "f", + "grantee": "authenticated", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql", + "objtype": "f", + "grantee": "service_role", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": false + }, + { + "in_schema": "graphql", + "objtype": "r", + "grantee": "postgres", + "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, + { + "privilege": "SELECT", "grantable": false }, { @@ -2291,113 +5378,306 @@ "is_implicit": false }, { - "in_schema": "storage", - "objtype": "S", - "grantee": "postgres", + "in_schema": "graphql", + "objtype": "r", + "grantee": "anon", "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, { "privilege": "SELECT", "grantable": false }, { - "privilege": "UPDATE", + "privilege": "TRIGGER", "grantable": false }, { - "privilege": "USAGE", + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", "grantable": false } ], "is_implicit": false }, { - "in_schema": "storage", - "objtype": "S", - "grantee": "anon", + "in_schema": "graphql", + "objtype": "r", + "grantee": "authenticated", "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, { "privilege": "SELECT", "grantable": false }, { - "privilege": "UPDATE", + "privilege": "TRIGGER", "grantable": false }, { - "privilege": "USAGE", + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", "grantable": false } ], "is_implicit": false }, { - "in_schema": "storage", - "objtype": "S", - "grantee": "authenticated", + "in_schema": "graphql", + "objtype": "r", + "grantee": "service_role", "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, { "privilege": "SELECT", "grantable": false }, + { + "privilege": "TRIGGER", + "grantable": false + }, + { + "privilege": "TRUNCATE", + "grantable": false + }, { "privilege": "UPDATE", "grantable": false + } + ], + "is_implicit": false + } + ], + "security_labels": [] + }, + "role:supabase_auth_admin": { + "name": "supabase_auth_admin", + "is_superuser": false, + "can_inherit": false, + "can_create_roles": true, + "can_create_databases": false, + "can_login": true, + "can_replicate": false, + "connection_limit": -1, + "can_bypass_rls": false, + "config": [ + "search_path=auth", + "idle_in_transaction_session_timeout=60000", + "log_statement=none" + ], + "comment": null, + "members": [], + "default_privileges": [ + { + "in_schema": null, + "objtype": "S", + "grantee": "supabase_auth_admin", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "supabase_auth_admin", + "privileges": [ + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "supabase_auth_admin", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "n", + "grantee": "supabase_auth_admin", + "privileges": [ + { + "privilege": "CREATE", + "grantable": false }, { "privilege": "USAGE", "grantable": false } ], - "is_implicit": false + "is_implicit": true }, { - "in_schema": "storage", - "objtype": "S", - "grantee": "service_role", + "in_schema": null, + "objtype": "r", + "grantee": "supabase_auth_admin", "privileges": [ + { + "privilege": "DELETE", + "grantable": false + }, + { + "privilege": "INSERT", + "grantable": false + }, + { + "privilege": "MAINTAIN", + "grantable": false + }, + { + "privilege": "REFERENCES", + "grantable": false + }, { "privilege": "SELECT", "grantable": false }, { - "privilege": "UPDATE", + "privilege": "TRIGGER", "grantable": false }, { - "privilege": "USAGE", + "privilege": "TRUNCATE", + "grantable": false + }, + { + "privilege": "UPDATE", "grantable": false } ], - "is_implicit": false + "is_implicit": true }, { - "in_schema": "storage", - "objtype": "f", + "in_schema": "auth", + "objtype": "S", "grantee": "postgres", "privileges": [ { - "privilege": "EXECUTE", + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", "grantable": false } ], "is_implicit": false }, { - "in_schema": "storage", - "objtype": "f", - "grantee": "anon", + "in_schema": "auth", + "objtype": "S", + "grantee": "dashboard_user", "privileges": [ { - "privilege": "EXECUTE", + "privilege": "SELECT", + "grantable": false + }, + { + "privilege": "UPDATE", + "grantable": false + }, + { + "privilege": "USAGE", "grantable": false } ], "is_implicit": false }, { - "in_schema": "storage", + "in_schema": "auth", "objtype": "f", - "grantee": "authenticated", + "grantee": "postgres", "privileges": [ { "privilege": "EXECUTE", @@ -2407,9 +5687,9 @@ "is_implicit": false }, { - "in_schema": "storage", + "in_schema": "auth", "objtype": "f", - "grantee": "service_role", + "grantee": "dashboard_user", "privileges": [ { "privilege": "EXECUTE", @@ -2419,7 +5699,7 @@ "is_implicit": false }, { - "in_schema": "storage", + "in_schema": "auth", "objtype": "r", "grantee": "postgres", "privileges": [ @@ -2459,9 +5739,9 @@ "is_implicit": false }, { - "in_schema": "storage", + "in_schema": "auth", "objtype": "r", - "grantee": "anon", + "grantee": "dashboard_user", "privileges": [ { "privilege": "DELETE", @@ -2497,51 +5777,104 @@ } ], "is_implicit": false - }, + } + ], + "security_labels": [] + }, + "role:supabase_etl_admin": { + "name": "supabase_etl_admin", + "is_superuser": false, + "can_inherit": true, + "can_create_roles": false, + "can_create_databases": false, + "can_login": true, + "can_replicate": true, + "connection_limit": -1, + "can_bypass_rls": true, + "config": null, + "comment": null, + "members": [], + "default_privileges": [ { - "in_schema": "storage", - "objtype": "r", - "grantee": "authenticated", + "in_schema": null, + "objtype": "S", + "grantee": "supabase_etl_admin", "privileges": [ { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", + "privilege": "USAGE", "grantable": false - }, + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", + "privileges": [ { - "privilege": "MAINTAIN", + "privilege": "USAGE", "grantable": false - }, + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "supabase_etl_admin", + "privileges": [ { - "privilege": "REFERENCES", + "privilege": "USAGE", "grantable": false - }, + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "PUBLIC", + "privileges": [ { - "privilege": "SELECT", + "privilege": "EXECUTE", "grantable": false - }, + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "supabase_etl_admin", + "privileges": [ { - "privilege": "TRIGGER", + "privilege": "EXECUTE", "grantable": false - }, + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "n", + "grantee": "supabase_etl_admin", + "privileges": [ { - "privilege": "TRUNCATE", + "privilege": "CREATE", "grantable": false }, { - "privilege": "UPDATE", + "privilege": "USAGE", "grantable": false } ], - "is_implicit": false + "is_implicit": true }, { - "in_schema": "storage", + "in_schema": null, "objtype": "r", - "grantee": "service_role", + "grantee": "supabase_etl_admin", "privileges": [ { "privilege": "DELETE", @@ -2576,44 +5909,31 @@ "grantable": false } ], - "is_implicit": false + "is_implicit": true } ], "security_labels": [] }, - "role:service_role": { - "name": "service_role", + "role:supabase_read_only_user": { + "name": "supabase_read_only_user", "is_superuser": false, "can_inherit": true, "can_create_roles": false, "can_create_databases": false, - "can_login": false, + "can_login": true, "can_replicate": false, "connection_limit": -1, "can_bypass_rls": true, - "config": null, - "comment": null, - "members": [ - { - "member": "authenticator", - "grantor": "supabase_admin", - "admin_option": false, - "inherit_option": false, - "set_option": true - }, - { - "member": "postgres", - "grantor": "supabase_admin", - "admin_option": true, - "inherit_option": true, - "set_option": true - } + "config": [ + "default_transaction_read_only=on" ], + "comment": null, + "members": [], "default_privileges": [ { "in_schema": null, "objtype": "S", - "grantee": "service_role", + "grantee": "supabase_read_only_user", "privileges": [ { "privilege": "USAGE", @@ -2637,7 +5957,7 @@ { "in_schema": null, "objtype": "T", - "grantee": "service_role", + "grantee": "supabase_read_only_user", "privileges": [ { "privilege": "USAGE", @@ -2661,7 +5981,7 @@ { "in_schema": null, "objtype": "f", - "grantee": "service_role", + "grantee": "supabase_read_only_user", "privileges": [ { "privilege": "EXECUTE", @@ -2673,7 +5993,7 @@ { "in_schema": null, "objtype": "n", - "grantee": "service_role", + "grantee": "supabase_read_only_user", "privileges": [ { "privilege": "CREATE", @@ -2689,7 +6009,7 @@ { "in_schema": null, "objtype": "r", - "grantee": "service_role", + "grantee": "supabase_read_only_user", "privileges": [ { "privilege": "DELETE", @@ -2729,19 +6049,18 @@ ], "security_labels": [] }, - "role:supabase_admin": { - "name": "supabase_admin", - "is_superuser": true, - "can_inherit": true, + "role:supabase_realtime_admin": { + "name": "supabase_realtime_admin", + "is_superuser": false, + "can_inherit": false, "can_create_roles": true, - "can_create_databases": true, + "can_create_databases": false, "can_login": true, "can_replicate": true, "connection_limit": -1, - "can_bypass_rls": true, + "can_bypass_rls": false, "config": [ - "search_path=\"\\$user\", public, auth, extensions", - "log_statement=none" + "search_path=public, extensions, realtime" ], "comment": null, "members": [], @@ -2749,7 +6068,7 @@ { "in_schema": null, "objtype": "S", - "grantee": "supabase_admin", + "grantee": "supabase_realtime_admin", "privileges": [ { "privilege": "USAGE", @@ -2773,7 +6092,7 @@ { "in_schema": null, "objtype": "T", - "grantee": "supabase_admin", + "grantee": "supabase_realtime_admin", "privileges": [ { "privilege": "USAGE", @@ -2797,7 +6116,7 @@ { "in_schema": null, "objtype": "f", - "grantee": "supabase_admin", + "grantee": "supabase_realtime_admin", "privileges": [ { "privilege": "EXECUTE", @@ -2809,7 +6128,7 @@ { "in_schema": null, "objtype": "n", - "grantee": "supabase_admin", + "grantee": "supabase_realtime_admin", "privileges": [ { "privilege": "CREATE", @@ -2825,7 +6144,7 @@ { "in_schema": null, "objtype": "r", - "grantee": "supabase_admin", + "grantee": "supabase_realtime_admin", "privileges": [ { "privilege": "DELETE", @@ -2861,179 +6180,104 @@ } ], "is_implicit": true - }, - { - "in_schema": "public", - "objtype": "S", - "grantee": "postgres", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false - }, - { - "in_schema": "public", - "objtype": "S", - "grantee": "anon", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false - }, - { - "in_schema": "public", - "objtype": "S", - "grantee": "authenticated", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false - }, + } + ], + "security_labels": [] + }, + "role:supabase_replication_admin": { + "name": "supabase_replication_admin", + "is_superuser": false, + "can_inherit": true, + "can_create_roles": false, + "can_create_databases": false, + "can_login": true, + "can_replicate": true, + "connection_limit": -1, + "can_bypass_rls": false, + "config": null, + "comment": null, + "members": [], + "default_privileges": [ { - "in_schema": "public", + "in_schema": null, "objtype": "S", - "grantee": "service_role", + "grantee": "supabase_replication_admin", "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, { "privilege": "USAGE", "grantable": false } ], - "is_implicit": false + "is_implicit": true }, { - "in_schema": "public", - "objtype": "f", - "grantee": "postgres", + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", "privileges": [ { - "privilege": "EXECUTE", + "privilege": "USAGE", "grantable": false } ], - "is_implicit": false + "is_implicit": true }, { - "in_schema": "public", - "objtype": "f", - "grantee": "anon", + "in_schema": null, + "objtype": "T", + "grantee": "supabase_replication_admin", "privileges": [ { - "privilege": "EXECUTE", + "privilege": "USAGE", "grantable": false } ], - "is_implicit": false + "is_implicit": true }, { - "in_schema": "public", + "in_schema": null, "objtype": "f", - "grantee": "authenticated", + "grantee": "PUBLIC", "privileges": [ { "privilege": "EXECUTE", "grantable": false } ], - "is_implicit": false + "is_implicit": true }, { - "in_schema": "public", + "in_schema": null, "objtype": "f", - "grantee": "service_role", + "grantee": "supabase_replication_admin", "privileges": [ { "privilege": "EXECUTE", "grantable": false } ], - "is_implicit": false + "is_implicit": true }, { - "in_schema": "public", - "objtype": "r", - "grantee": "postgres", + "in_schema": null, + "objtype": "n", + "grantee": "supabase_replication_admin", "privileges": [ { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", + "privilege": "CREATE", "grantable": false }, { - "privilege": "UPDATE", + "privilege": "USAGE", "grantable": false } ], - "is_implicit": false + "is_implicit": true }, { - "in_schema": "public", + "in_schema": null, "objtype": "r", - "grantee": "anon", + "grantee": "supabase_replication_admin", "privileges": [ { "privilege": "DELETE", @@ -3068,52 +6312,108 @@ "grantable": false } ], - "is_implicit": false - }, + "is_implicit": true + } + ], + "security_labels": [] + }, + "role:supabase_storage_admin": { + "name": "supabase_storage_admin", + "is_superuser": false, + "can_inherit": false, + "can_create_roles": true, + "can_create_databases": false, + "can_login": true, + "can_replicate": false, + "connection_limit": -1, + "can_bypass_rls": false, + "config": [ + "search_path=storage", + "log_statement=none" + ], + "comment": null, + "members": [], + "default_privileges": [ { - "in_schema": "public", - "objtype": "r", - "grantee": "authenticated", + "in_schema": null, + "objtype": "S", + "grantee": "supabase_storage_admin", "privileges": [ { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", + "privilege": "USAGE", "grantable": false - }, + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", + "privileges": [ { - "privilege": "MAINTAIN", + "privilege": "USAGE", "grantable": false - }, + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "supabase_storage_admin", + "privileges": [ { - "privilege": "REFERENCES", + "privilege": "USAGE", "grantable": false - }, + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "PUBLIC", + "privileges": [ { - "privilege": "SELECT", + "privilege": "EXECUTE", "grantable": false - }, + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "supabase_storage_admin", + "privileges": [ { - "privilege": "TRIGGER", + "privilege": "EXECUTE", "grantable": false - }, + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "n", + "grantee": "supabase_storage_admin", + "privileges": [ { - "privilege": "TRUNCATE", + "privilege": "CREATE", "grantable": false }, { - "privilege": "UPDATE", + "privilege": "USAGE", "grantable": false } ], - "is_implicit": false + "is_implicit": true }, { - "in_schema": "public", + "in_schema": null, "objtype": "r", - "grantee": "service_role", + "grantee": "supabase_storage_admin", "privileges": [ { "privilege": "DELETE", @@ -3148,2190 +6448,1829 @@ "grantable": false } ], - "is_implicit": false + "is_implicit": true + } + ], + "security_labels": [] + }, + "role:supabase_superuser": { + "name": "supabase_superuser", + "is_superuser": false, + "can_inherit": true, + "can_create_roles": false, + "can_create_databases": false, + "can_login": false, + "can_replicate": false, + "connection_limit": -1, + "can_bypass_rls": false, + "config": null, + "comment": null, + "members": [ + { + "member": "supabase_etl_admin", + "grantor": "supabase_admin", + "admin_option": false, + "inherit_option": true, + "set_option": true }, { - "in_schema": "extensions", + "member": "postgres", + "grantor": "supabase_admin", + "admin_option": false, + "inherit_option": true, + "set_option": true + } + ], + "default_privileges": [ + { + "in_schema": null, "objtype": "S", - "grantee": "postgres", + "grantee": "supabase_superuser", "privileges": [ { - "privilege": "SELECT", - "grantable": true - }, + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "PUBLIC", + "privileges": [ { - "privilege": "UPDATE", - "grantable": true - }, + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "T", + "grantee": "supabase_superuser", + "privileges": [ { "privilege": "USAGE", - "grantable": true + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, + "objtype": "f", + "grantee": "PUBLIC", + "privileges": [ + { + "privilege": "EXECUTE", + "grantable": false } ], - "is_implicit": false + "is_implicit": true }, { - "in_schema": "extensions", + "in_schema": null, "objtype": "f", - "grantee": "postgres", + "grantee": "supabase_superuser", "privileges": [ { "privilege": "EXECUTE", - "grantable": true + "grantable": false } ], - "is_implicit": false + "is_implicit": true }, { - "in_schema": "extensions", + "in_schema": null, + "objtype": "n", + "grantee": "supabase_superuser", + "privileges": [ + { + "privilege": "CREATE", + "grantable": false + }, + { + "privilege": "USAGE", + "grantable": false + } + ], + "is_implicit": true + }, + { + "in_schema": null, "objtype": "r", - "grantee": "postgres", + "grantee": "supabase_superuser", "privileges": [ { "privilege": "DELETE", - "grantable": true + "grantable": false }, { "privilege": "INSERT", - "grantable": true + "grantable": false }, { "privilege": "MAINTAIN", - "grantable": true + "grantable": false }, { "privilege": "REFERENCES", - "grantable": true + "grantable": false }, { "privilege": "SELECT", - "grantable": true + "grantable": false }, { "privilege": "TRIGGER", - "grantable": true + "grantable": false }, { "privilege": "TRUNCATE", - "grantable": true + "grantable": false }, { "privilege": "UPDATE", - "grantable": true + "grantable": false } ], - "is_implicit": false + "is_implicit": true + } + ], + "security_labels": [] + } + }, + "schemas": { + "schema:_realtime": { + "name": "_realtime", + "owner": "postgres", + "comment": null, + "privileges": [ + { + "grantee": "postgres", + "privilege": "CREATE", + "grantable": false }, { - "in_schema": "realtime", - "objtype": "S", "grantee": "postgres", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "USAGE", + "grantable": false + } + ], + "security_labels": [] + }, + "schema:auth": { + "name": "auth", + "owner": "supabase_admin", + "comment": null, + "privileges": [ + { + "grantee": "supabase_admin", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "postgres", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "anon", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "authenticated", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "service_role", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "supabase_auth_admin", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "supabase_auth_admin", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "dashboard_user", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "dashboard_user", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "USAGE", + "grantable": false + } + ], + "security_labels": [] + }, + "schema:extensions": { + "name": "extensions", + "owner": "postgres", + "comment": null, + "privileges": [ + { + "grantee": "postgres", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "postgres", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "anon", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "authenticated", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "service_role", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "dashboard_user", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "dashboard_user", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "USAGE", + "grantable": false + } + ], + "security_labels": [] + }, + "schema:graphql": { + "name": "graphql", + "owner": "supabase_admin", + "comment": null, + "privileges": [ + { + "grantee": "supabase_admin", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "postgres", + "privilege": "USAGE", + "grantable": true + }, + { + "grantee": "anon", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "authenticated", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "service_role", + "privilege": "USAGE", + "grantable": false + } + ], + "security_labels": [] + }, + "schema:graphql_public": { + "name": "graphql_public", + "owner": "supabase_admin", + "comment": null, + "privileges": [ + { + "grantee": "supabase_admin", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "postgres", + "privilege": "USAGE", + "grantable": true }, { - "in_schema": "realtime", - "objtype": "S", - "grantee": "dashboard_user", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "anon", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "realtime", - "objtype": "f", - "grantee": "postgres", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "authenticated", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "realtime", - "objtype": "f", - "grantee": "dashboard_user", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "service_role", + "privilege": "USAGE", + "grantable": false + } + ], + "security_labels": [] + }, + "schema:pgbouncer": { + "name": "pgbouncer", + "owner": "pgbouncer", + "comment": null, + "privileges": [ + { + "grantee": "pgbouncer", + "privilege": "CREATE", + "grantable": false }, { - "in_schema": "realtime", - "objtype": "r", - "grantee": "postgres", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "pgbouncer", + "privilege": "USAGE", + "grantable": false + } + ], + "security_labels": [] + }, + "schema:public": { + "name": "public", + "owner": "pg_database_owner", + "comment": "standard public schema", + "privileges": [ + { + "grantee": "PUBLIC", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "realtime", - "objtype": "r", - "grantee": "dashboard_user", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "pg_database_owner", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "pg_database_owner", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql_public", - "objtype": "S", "grantee": "postgres", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql_public", - "objtype": "S", "grantee": "anon", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql_public", - "objtype": "S", "grantee": "authenticated", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql_public", - "objtype": "S", "grantee": "service_role", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql_public", - "objtype": "f", - "grantee": "postgres", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "supabase_realtime_admin", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "USAGE", + "grantable": false + } + ], + "security_labels": [] + }, + "schema:realtime": { + "name": "realtime", + "owner": "supabase_admin", + "comment": null, + "privileges": [ + { + "grantee": "supabase_admin", + "privilege": "CREATE", + "grantable": false }, { - "in_schema": "graphql_public", - "objtype": "f", - "grantee": "anon", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "supabase_admin", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql_public", - "objtype": "f", - "grantee": "authenticated", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "postgres", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql_public", - "objtype": "f", - "grantee": "service_role", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "postgres", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql_public", - "objtype": "r", - "grantee": "postgres", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "anon", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql_public", - "objtype": "r", "grantee": "anon", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql_public", - "objtype": "r", "grantee": "authenticated", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "authenticated", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql_public", - "objtype": "r", "grantee": "service_role", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql", - "objtype": "S", - "grantee": "postgres", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "service_role", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql", - "objtype": "S", - "grantee": "anon", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "supabase_realtime_admin", + "privilege": "CREATE", + "grantable": false }, { - "in_schema": "graphql", - "objtype": "S", - "grantee": "authenticated", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "supabase_realtime_admin", + "privilege": "CREATE", + "grantable": true }, { - "in_schema": "graphql", - "objtype": "S", - "grantee": "service_role", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "supabase_realtime_admin", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "USAGE", + "grantable": true + } + ], + "security_labels": [] + }, + "schema:storage": { + "name": "storage", + "owner": "supabase_admin", + "comment": null, + "privileges": [ + { + "grantee": "supabase_admin", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql", - "objtype": "f", "grantee": "postgres", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": true }, { - "in_schema": "graphql", - "objtype": "f", "grantee": "anon", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql", - "objtype": "f", "grantee": "authenticated", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql", - "objtype": "f", "grantee": "service_role", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "graphql", - "objtype": "r", - "grantee": "postgres", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "supabase_storage_admin", + "privilege": "CREATE", + "grantable": true }, { - "in_schema": "graphql", - "objtype": "r", - "grantee": "anon", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "supabase_storage_admin", + "privilege": "USAGE", + "grantable": true }, { - "in_schema": "graphql", - "objtype": "r", - "grantee": "authenticated", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "dashboard_user", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "dashboard_user", + "privilege": "USAGE", + "grantable": false + } + ], + "security_labels": [] + }, + "schema:vault": { + "name": "vault", + "owner": "supabase_admin", + "comment": null, + "privileges": [ + { + "grantee": "supabase_admin", + "privilege": "CREATE", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "postgres", + "privilege": "USAGE", + "grantable": true }, { - "in_schema": "graphql", - "objtype": "r", "grantee": "service_role", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "privilege": "USAGE", + "grantable": false } ], "security_labels": [] - }, - "role:supabase_auth_admin": { - "name": "supabase_auth_admin", - "is_superuser": false, - "can_inherit": false, - "can_create_roles": true, - "can_create_databases": false, - "can_login": true, - "can_replicate": false, - "connection_limit": -1, - "can_bypass_rls": false, - "config": [ - "search_path=auth", - "idle_in_transaction_session_timeout=60000", - "log_statement=none" - ], + } + }, + "sequences": { + "sequence:auth.refresh_tokens_id_seq": { + "schema": "auth", + "name": "refresh_tokens_id_seq", + "data_type": "bigint", + "start_value": 1, + "minimum_value": "1", + "maximum_value": "9223372036854775807", + "increment": 1, + "cycle_option": false, + "cache_size": 1, + "persistence": "p", + "owned_by_schema": "auth", + "owned_by_table": "refresh_tokens", + "owned_by_column": "id", "comment": null, - "members": [], - "default_privileges": [ + "privileges": [ { - "in_schema": null, - "objtype": "S", - "grantee": "supabase_auth_admin", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "SELECT", + "grantable": false }, { - "in_schema": null, - "objtype": "T", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "UPDATE", + "grantable": false }, { - "in_schema": null, - "objtype": "T", - "grantee": "supabase_auth_admin", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": null, - "objtype": "f", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_auth_admin", + "privilege": "SELECT", + "grantable": false }, { - "in_schema": null, - "objtype": "f", "grantee": "supabase_auth_admin", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "privilege": "UPDATE", + "grantable": false }, { - "in_schema": null, - "objtype": "n", "grantee": "supabase_auth_admin", - "privileges": [ - { - "privilege": "CREATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "privilege": "USAGE", + "grantable": false }, { - "in_schema": null, - "objtype": "r", - "grantee": "supabase_auth_admin", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "dashboard_user", + "privilege": "SELECT", + "grantable": false + }, + { + "grantee": "dashboard_user", + "privilege": "UPDATE", + "grantable": false + }, + { + "grantee": "dashboard_user", + "privilege": "USAGE", + "grantable": false + } + ], + "owner": "supabase_auth_admin", + "security_labels": [] + }, + "sequence:public.test_tenant_id_seq": { + "schema": "public", + "name": "test_tenant_id_seq", + "data_type": "integer", + "start_value": 1, + "minimum_value": "1", + "maximum_value": "2147483647", + "increment": 1, + "cycle_option": false, + "cache_size": 1, + "persistence": "p", + "owned_by_schema": "public", + "owned_by_table": "test_tenant", + "owned_by_column": "id", + "comment": null, + "privileges": [ + { + "grantee": "supabase_admin", + "privilege": "SELECT", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "UPDATE", + "grantable": false + }, + { + "grantee": "supabase_admin", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "postgres", + "privilege": "SELECT", + "grantable": false + }, + { + "grantee": "postgres", + "privilege": "UPDATE", + "grantable": false + }, + { + "grantee": "postgres", + "privilege": "USAGE", + "grantable": false + }, + { + "grantee": "anon", + "privilege": "SELECT", + "grantable": false + }, + { + "grantee": "anon", + "privilege": "UPDATE", + "grantable": false }, { - "in_schema": "auth", - "objtype": "S", - "grantee": "postgres", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "anon", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "auth", - "objtype": "S", - "grantee": "dashboard_user", - "privileges": [ - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "authenticated", + "privilege": "SELECT", + "grantable": false }, { - "in_schema": "auth", - "objtype": "f", - "grantee": "postgres", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "authenticated", + "privilege": "UPDATE", + "grantable": false }, { - "in_schema": "auth", - "objtype": "f", - "grantee": "dashboard_user", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "authenticated", + "privilege": "USAGE", + "grantable": false }, { - "in_schema": "auth", - "objtype": "r", - "grantee": "postgres", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "service_role", + "privilege": "SELECT", + "grantable": false }, { - "in_schema": "auth", - "objtype": "r", - "grantee": "dashboard_user", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": false + "grantee": "service_role", + "privilege": "UPDATE", + "grantable": false + }, + { + "grantee": "service_role", + "privilege": "USAGE", + "grantable": false + } + ], + "owner": "supabase_admin", + "security_labels": [] + } + }, + "tables": { + "table:auth.audit_log_entries": { + "schema": "auth", + "name": "audit_log_entries", + "persistence": "p", + "row_security": false, + "force_row_security": false, + "has_indexes": true, + "has_rules": false, + "has_triggers": false, + "has_subclasses": false, + "is_populated": true, + "replica_identity": "d", + "replica_identity_index": null, + "is_partition": false, + "options": null, + "partition_bound": null, + "partition_by": null, + "owner": "supabase_auth_admin", + "comment": "Auth: Audit trail for user actions.", + "parent_schema": null, + "parent_name": null, + "columns": [ + { + "name": "instance_id", + "position": 1, + "data_type": "uuid", + "data_type_str": "uuid", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "id", + "position": 2, + "data_type": "uuid", + "data_type_str": "uuid", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": true, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "payload", + "position": 3, + "data_type": "json", + "data_type_str": "json", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "created_at", + "position": 4, + "data_type": "timestamp with time zone", + "data_type_str": "timestamp with time zone", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] } ], - "security_labels": [] - }, - "role:supabase_etl_admin": { - "name": "supabase_etl_admin", - "is_superuser": false, - "can_inherit": true, - "can_create_roles": false, - "can_create_databases": false, - "can_login": true, - "can_replicate": true, - "connection_limit": -1, - "can_bypass_rls": true, - "config": null, - "comment": null, - "members": [], - "default_privileges": [ + "constraints": [ { - "in_schema": null, - "objtype": "S", - "grantee": "supabase_etl_admin", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } + "name": "audit_log_entries_pkey", + "constraint_type": "p", + "deferrable": false, + "initially_deferred": false, + "validated": true, + "is_local": true, + "no_inherit": true, + "is_temporal": false, + "is_partition_clone": false, + "parent_constraint_schema": null, + "parent_constraint_name": null, + "parent_table_schema": null, + "parent_table_name": null, + "key_columns": [ + "id" ], - "is_implicit": true - }, + "foreign_key_columns": null, + "foreign_key_table": null, + "foreign_key_schema": null, + "foreign_key_table_is_partition": null, + "foreign_key_parent_schema": null, + "foreign_key_parent_table": null, + "foreign_key_effective_schema": null, + "foreign_key_effective_table": null, + "on_update": null, + "on_delete": null, + "match_type": null, + "check_expression": null, + "owner": "supabase_auth_admin", + "definition": "PRIMARY KEY (id)", + "comment": null + } + ], + "privileges": [ { - "in_schema": null, - "objtype": "T", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "DELETE", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "T", - "grantee": "supabase_etl_admin", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "INSERT", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "f", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "f", - "grantee": "supabase_etl_admin", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "REFERENCES", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "n", - "grantee": "supabase_etl_admin", - "privileges": [ - { - "privilege": "CREATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "r", - "grantee": "supabase_etl_admin", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": true - } - ], - "security_labels": [] - }, - "role:supabase_read_only_user": { - "name": "supabase_read_only_user", - "is_superuser": false, - "can_inherit": true, - "can_create_roles": false, - "can_create_databases": false, - "can_login": true, - "can_replicate": false, - "connection_limit": -1, - "can_bypass_rls": true, - "config": [ - "default_transaction_read_only=on" - ], - "comment": null, - "members": [], - "default_privileges": [ + "grantee": "postgres", + "privilege": "TRIGGER", + "grantable": false, + "columns": null + }, { - "in_schema": null, - "objtype": "S", - "grantee": "supabase_read_only_user", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "TRUNCATE", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "T", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "UPDATE", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "T", - "grantee": "supabase_read_only_user", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_auth_admin", + "privilege": "DELETE", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "f", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_auth_admin", + "privilege": "INSERT", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "f", - "grantee": "supabase_read_only_user", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_auth_admin", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "n", - "grantee": "supabase_read_only_user", - "privileges": [ - { - "privilege": "CREATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_auth_admin", + "privilege": "REFERENCES", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "r", - "grantee": "supabase_read_only_user", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": true - } - ], - "security_labels": [] - }, - "role:supabase_replication_admin": { - "name": "supabase_replication_admin", - "is_superuser": false, - "can_inherit": true, - "can_create_roles": false, - "can_create_databases": false, - "can_login": true, - "can_replicate": true, - "connection_limit": -1, - "can_bypass_rls": false, - "config": null, - "comment": null, - "members": [], - "default_privileges": [ - { - "in_schema": null, - "objtype": "S", - "grantee": "supabase_replication_admin", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_auth_admin", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "T", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_auth_admin", + "privilege": "TRIGGER", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "T", - "grantee": "supabase_replication_admin", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_auth_admin", + "privilege": "TRUNCATE", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "f", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "supabase_auth_admin", + "privilege": "UPDATE", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "f", - "grantee": "supabase_replication_admin", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "dashboard_user", + "privilege": "DELETE", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "n", - "grantee": "supabase_replication_admin", - "privileges": [ - { - "privilege": "CREATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "dashboard_user", + "privilege": "INSERT", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "r", - "grantee": "supabase_replication_admin", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": true - } - ], - "security_labels": [] - }, - "role:supabase_storage_admin": { - "name": "supabase_storage_admin", - "is_superuser": false, - "can_inherit": false, - "can_create_roles": true, - "can_create_databases": false, - "can_login": true, - "can_replicate": false, - "connection_limit": -1, - "can_bypass_rls": false, - "config": [ - "search_path=storage", - "log_statement=none" - ], - "comment": null, - "members": [], - "default_privileges": [ + "grantee": "dashboard_user", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null + }, { - "in_schema": null, - "objtype": "S", - "grantee": "supabase_storage_admin", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "dashboard_user", + "privilege": "REFERENCES", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "T", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "dashboard_user", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "T", - "grantee": "supabase_storage_admin", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "dashboard_user", + "privilege": "TRIGGER", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "f", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "dashboard_user", + "privilege": "TRUNCATE", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "f", - "grantee": "supabase_storage_admin", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "dashboard_user", + "privilege": "UPDATE", + "grantable": false, + "columns": null + } + ], + "security_labels": [] + }, + "table:auth.instances": { + "schema": "auth", + "name": "instances", + "persistence": "p", + "row_security": false, + "force_row_security": false, + "has_indexes": true, + "has_rules": false, + "has_triggers": false, + "has_subclasses": false, + "is_populated": true, + "replica_identity": "d", + "replica_identity_index": null, + "is_partition": false, + "options": null, + "partition_bound": null, + "partition_by": null, + "owner": "supabase_auth_admin", + "comment": "Auth: Manages users across multiple sites.", + "parent_schema": null, + "parent_name": null, + "columns": [ + { + "name": "id", + "position": 1, + "data_type": "uuid", + "data_type_str": "uuid", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": true, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] }, { - "in_schema": null, - "objtype": "n", - "grantee": "supabase_storage_admin", - "privileges": [ - { - "privilege": "CREATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "name": "uuid", + "position": 2, + "data_type": "uuid", + "data_type_str": "uuid", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] }, { - "in_schema": null, - "objtype": "r", - "grantee": "supabase_storage_admin", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } + "name": "raw_base_config", + "position": 3, + "data_type": "text", + "data_type_str": "text", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "created_at", + "position": 4, + "data_type": "timestamp with time zone", + "data_type_str": "timestamp with time zone", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "updated_at", + "position": 5, + "data_type": "timestamp with time zone", + "data_type_str": "timestamp with time zone", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + } + ], + "constraints": [ + { + "name": "instances_pkey", + "constraint_type": "p", + "deferrable": false, + "initially_deferred": false, + "validated": true, + "is_local": true, + "no_inherit": true, + "is_temporal": false, + "is_partition_clone": false, + "parent_constraint_schema": null, + "parent_constraint_name": null, + "parent_table_schema": null, + "parent_table_name": null, + "key_columns": [ + "id" ], - "is_implicit": true + "foreign_key_columns": null, + "foreign_key_table": null, + "foreign_key_schema": null, + "foreign_key_table_is_partition": null, + "foreign_key_parent_schema": null, + "foreign_key_parent_table": null, + "foreign_key_effective_schema": null, + "foreign_key_effective_table": null, + "on_update": null, + "on_delete": null, + "match_type": null, + "check_expression": null, + "owner": "supabase_auth_admin", + "definition": "PRIMARY KEY (id)", + "comment": null } ], - "security_labels": [] - }, - "role:supabase_superuser": { - "name": "supabase_superuser", - "is_superuser": false, - "can_inherit": true, - "can_create_roles": false, - "can_create_databases": false, - "can_login": false, - "can_replicate": false, - "connection_limit": -1, - "can_bypass_rls": false, - "config": null, - "comment": null, - "members": [ + "privileges": [ { - "member": "supabase_etl_admin", - "grantor": "supabase_admin", - "admin_option": false, - "inherit_option": true, - "set_option": true + "grantee": "postgres", + "privilege": "DELETE", + "grantable": false, + "columns": null }, { - "member": "postgres", - "grantor": "supabase_admin", - "admin_option": false, - "inherit_option": true, - "set_option": true - } - ], - "default_privileges": [ - { - "in_schema": null, - "objtype": "S", - "grantee": "supabase_superuser", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "INSERT", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "T", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "T", - "grantee": "supabase_superuser", - "privileges": [ - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "REFERENCES", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "f", - "grantee": "PUBLIC", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "f", - "grantee": "supabase_superuser", - "privileges": [ - { - "privilege": "EXECUTE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "TRIGGER", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "n", - "grantee": "supabase_superuser", - "privileges": [ - { - "privilege": "CREATE", - "grantable": false - }, - { - "privilege": "USAGE", - "grantable": false - } - ], - "is_implicit": true + "grantee": "postgres", + "privilege": "TRUNCATE", + "grantable": false, + "columns": null }, { - "in_schema": null, - "objtype": "r", - "grantee": "supabase_superuser", - "privileges": [ - { - "privilege": "DELETE", - "grantable": false - }, - { - "privilege": "INSERT", - "grantable": false - }, - { - "privilege": "MAINTAIN", - "grantable": false - }, - { - "privilege": "REFERENCES", - "grantable": false - }, - { - "privilege": "SELECT", - "grantable": false - }, - { - "privilege": "TRIGGER", - "grantable": false - }, - { - "privilege": "TRUNCATE", - "grantable": false - }, - { - "privilege": "UPDATE", - "grantable": false - } - ], - "is_implicit": true - } - ], - "security_labels": [] - } - }, - "schemas": { - "schema:auth": { - "name": "auth", - "owner": "supabase_admin", - "comment": null, - "privileges": [ + "grantee": "postgres", + "privilege": "UPDATE", + "grantable": false, + "columns": null + }, { - "grantee": "supabase_admin", - "privilege": "CREATE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "DELETE", + "grantable": false, + "columns": null }, { - "grantee": "supabase_admin", - "privilege": "USAGE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "INSERT", + "grantable": false, + "columns": null }, { - "grantee": "postgres", - "privilege": "USAGE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null }, { - "grantee": "anon", - "privilege": "USAGE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "REFERENCES", + "grantable": false, + "columns": null }, { - "grantee": "authenticated", - "privilege": "USAGE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "grantee": "service_role", - "privilege": "USAGE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "TRIGGER", + "grantable": false, + "columns": null }, { "grantee": "supabase_auth_admin", - "privilege": "CREATE", - "grantable": false + "privilege": "TRUNCATE", + "grantable": false, + "columns": null }, { "grantee": "supabase_auth_admin", - "privilege": "USAGE", - "grantable": false + "privilege": "UPDATE", + "grantable": false, + "columns": null }, { "grantee": "dashboard_user", - "privilege": "CREATE", - "grantable": false + "privilege": "DELETE", + "grantable": false, + "columns": null }, { "grantee": "dashboard_user", - "privilege": "USAGE", - "grantable": false - } - ], - "security_labels": [] - }, - "schema:extensions": { - "name": "extensions", - "owner": "postgres", - "comment": null, - "privileges": [ - { - "grantee": "postgres", - "privilege": "CREATE", - "grantable": false + "privilege": "INSERT", + "grantable": false, + "columns": null }, { - "grantee": "postgres", - "privilege": "USAGE", - "grantable": false + "grantee": "dashboard_user", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null }, { - "grantee": "anon", - "privilege": "USAGE", - "grantable": false + "grantee": "dashboard_user", + "privilege": "REFERENCES", + "grantable": false, + "columns": null }, { - "grantee": "authenticated", - "privilege": "USAGE", - "grantable": false + "grantee": "dashboard_user", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "grantee": "service_role", - "privilege": "USAGE", - "grantable": false + "grantee": "dashboard_user", + "privilege": "TRIGGER", + "grantable": false, + "columns": null }, { "grantee": "dashboard_user", - "privilege": "CREATE", - "grantable": false + "privilege": "TRUNCATE", + "grantable": false, + "columns": null }, { "grantee": "dashboard_user", - "privilege": "USAGE", - "grantable": false + "privilege": "UPDATE", + "grantable": false, + "columns": null } ], "security_labels": [] }, - "schema:graphql": { - "name": "graphql", - "owner": "supabase_admin", - "comment": null, - "privileges": [ + "table:auth.refresh_tokens": { + "schema": "auth", + "name": "refresh_tokens", + "persistence": "p", + "row_security": false, + "force_row_security": false, + "has_indexes": true, + "has_rules": false, + "has_triggers": false, + "has_subclasses": false, + "is_populated": true, + "replica_identity": "d", + "replica_identity_index": null, + "is_partition": false, + "options": null, + "partition_bound": null, + "partition_by": null, + "owner": "supabase_auth_admin", + "comment": "Auth: Store of tokens used to refresh JWT tokens once they expire.", + "parent_schema": null, + "parent_name": null, + "columns": [ { - "grantee": "supabase_admin", - "privilege": "CREATE", - "grantable": false + "name": "instance_id", + "position": 1, + "data_type": "uuid", + "data_type_str": "uuid", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] }, { - "grantee": "supabase_admin", - "privilege": "USAGE", - "grantable": false + "name": "id", + "position": 2, + "data_type": "bigint", + "data_type_str": "bigint", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": true, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": "nextval('auth.refresh_tokens_id_seq'::regclass)", + "comment": null, + "security_labels": [] }, { - "grantee": "postgres", - "privilege": "USAGE", - "grantable": true + "name": "token", + "position": 3, + "data_type": "character varying", + "data_type_str": "character varying(255)", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] }, { - "grantee": "anon", - "privilege": "USAGE", - "grantable": false + "name": "user_id", + "position": 4, + "data_type": "character varying", + "data_type_str": "character varying(255)", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] }, { - "grantee": "authenticated", - "privilege": "USAGE", - "grantable": false + "name": "revoked", + "position": 5, + "data_type": "boolean", + "data_type_str": "boolean", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] }, { - "grantee": "service_role", - "privilege": "USAGE", - "grantable": false + "name": "created_at", + "position": 6, + "data_type": "timestamp with time zone", + "data_type_str": "timestamp with time zone", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "updated_at", + "position": 7, + "data_type": "timestamp with time zone", + "data_type_str": "timestamp with time zone", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + } + ], + "constraints": [ + { + "name": "refresh_tokens_pkey", + "constraint_type": "p", + "deferrable": false, + "initially_deferred": false, + "validated": true, + "is_local": true, + "no_inherit": true, + "is_temporal": false, + "is_partition_clone": false, + "parent_constraint_schema": null, + "parent_constraint_name": null, + "parent_table_schema": null, + "parent_table_name": null, + "key_columns": [ + "id" + ], + "foreign_key_columns": null, + "foreign_key_table": null, + "foreign_key_schema": null, + "foreign_key_table_is_partition": null, + "foreign_key_parent_schema": null, + "foreign_key_parent_table": null, + "foreign_key_effective_schema": null, + "foreign_key_effective_table": null, + "on_update": null, + "on_delete": null, + "match_type": null, + "check_expression": null, + "owner": "supabase_auth_admin", + "definition": "PRIMARY KEY (id)", + "comment": null } ], - "security_labels": [] - }, - "schema:graphql_public": { - "name": "graphql_public", - "owner": "supabase_admin", - "comment": null, "privileges": [ { - "grantee": "supabase_admin", - "privilege": "CREATE", - "grantable": false + "grantee": "postgres", + "privilege": "DELETE", + "grantable": false, + "columns": null }, { - "grantee": "supabase_admin", - "privilege": "USAGE", - "grantable": false + "grantee": "postgres", + "privilege": "INSERT", + "grantable": false, + "columns": null }, { "grantee": "postgres", - "privilege": "USAGE", - "grantable": true + "privilege": "MAINTAIN", + "grantable": false, + "columns": null }, { - "grantee": "anon", - "privilege": "USAGE", - "grantable": false + "grantee": "postgres", + "privilege": "REFERENCES", + "grantable": false, + "columns": null }, { - "grantee": "authenticated", - "privilege": "USAGE", - "grantable": false + "grantee": "postgres", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "grantee": "service_role", - "privilege": "USAGE", - "grantable": false - } - ], - "security_labels": [] - }, - "schema:pgbouncer": { - "name": "pgbouncer", - "owner": "pgbouncer", - "comment": null, - "privileges": [ - { - "grantee": "pgbouncer", - "privilege": "CREATE", - "grantable": false + "grantee": "postgres", + "privilege": "TRIGGER", + "grantable": false, + "columns": null }, { - "grantee": "pgbouncer", - "privilege": "USAGE", - "grantable": false - } - ], - "security_labels": [] - }, - "schema:public": { - "name": "public", - "owner": "pg_database_owner", - "comment": "standard public schema", - "privileges": [ - { - "grantee": "PUBLIC", - "privilege": "USAGE", - "grantable": false + "grantee": "postgres", + "privilege": "TRUNCATE", + "grantable": false, + "columns": null }, { - "grantee": "pg_database_owner", - "privilege": "CREATE", - "grantable": false + "grantee": "postgres", + "privilege": "UPDATE", + "grantable": false, + "columns": null }, { - "grantee": "pg_database_owner", - "privilege": "USAGE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "DELETE", + "grantable": false, + "columns": null }, { - "grantee": "postgres", - "privilege": "USAGE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "INSERT", + "grantable": false, + "columns": null }, { - "grantee": "anon", - "privilege": "USAGE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null }, { - "grantee": "authenticated", - "privilege": "USAGE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "REFERENCES", + "grantable": false, + "columns": null }, { - "grantee": "service_role", - "privilege": "USAGE", - "grantable": false - } - ], - "security_labels": [] - }, - "schema:realtime": { - "name": "realtime", - "owner": "supabase_admin", - "comment": null, - "privileges": [ - { - "grantee": "supabase_admin", - "privilege": "CREATE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "grantee": "supabase_admin", - "privilege": "USAGE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "TRIGGER", + "grantable": false, + "columns": null }, { - "grantee": "postgres", - "privilege": "USAGE", - "grantable": false - } - ], - "security_labels": [] - }, - "schema:storage": { - "name": "storage", - "owner": "supabase_admin", - "comment": null, - "privileges": [ - { - "grantee": "supabase_admin", - "privilege": "CREATE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "TRUNCATE", + "grantable": false, + "columns": null }, { - "grantee": "supabase_admin", - "privilege": "USAGE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "UPDATE", + "grantable": false, + "columns": null }, { - "grantee": "postgres", - "privilege": "USAGE", - "grantable": true + "grantee": "dashboard_user", + "privilege": "DELETE", + "grantable": false, + "columns": null }, { - "grantee": "anon", - "privilege": "USAGE", - "grantable": false + "grantee": "dashboard_user", + "privilege": "INSERT", + "grantable": false, + "columns": null }, { - "grantee": "authenticated", - "privilege": "USAGE", - "grantable": false + "grantee": "dashboard_user", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null }, { - "grantee": "service_role", - "privilege": "USAGE", - "grantable": false + "grantee": "dashboard_user", + "privilege": "REFERENCES", + "grantable": false, + "columns": null }, { - "grantee": "supabase_storage_admin", - "privilege": "CREATE", - "grantable": true + "grantee": "dashboard_user", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "grantee": "supabase_storage_admin", - "privilege": "USAGE", - "grantable": true + "grantee": "dashboard_user", + "privilege": "TRIGGER", + "grantable": false, + "columns": null }, { "grantee": "dashboard_user", - "privilege": "CREATE", - "grantable": false + "privilege": "TRUNCATE", + "grantable": false, + "columns": null }, { "grantee": "dashboard_user", - "privilege": "USAGE", - "grantable": false + "privilege": "UPDATE", + "grantable": false, + "columns": null } ], "security_labels": [] }, - "schema:vault": { - "name": "vault", - "owner": "supabase_admin", - "comment": null, - "privileges": [ - { - "grantee": "supabase_admin", - "privilege": "CREATE", - "grantable": false - }, - { - "grantee": "supabase_admin", - "privilege": "USAGE", - "grantable": false - }, + "table:auth.schema_migrations": { + "schema": "auth", + "name": "schema_migrations", + "persistence": "p", + "row_security": false, + "force_row_security": false, + "has_indexes": true, + "has_rules": false, + "has_triggers": false, + "has_subclasses": false, + "is_populated": true, + "replica_identity": "d", + "replica_identity_index": null, + "is_partition": false, + "options": null, + "partition_bound": null, + "partition_by": null, + "owner": "supabase_auth_admin", + "comment": "Auth: Manages updates to the auth system.", + "parent_schema": null, + "parent_name": null, + "columns": [ { - "grantee": "postgres", - "privilege": "USAGE", - "grantable": true - }, + "name": "version", + "position": 1, + "data_type": "character varying", + "data_type_str": "character varying(255)", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": true, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + } + ], + "constraints": [ { - "grantee": "service_role", - "privilege": "USAGE", - "grantable": false + "name": "schema_migrations_pkey", + "constraint_type": "p", + "deferrable": false, + "initially_deferred": false, + "validated": true, + "is_local": true, + "no_inherit": true, + "is_temporal": false, + "is_partition_clone": false, + "parent_constraint_schema": null, + "parent_constraint_name": null, + "parent_table_schema": null, + "parent_table_name": null, + "key_columns": [ + "version" + ], + "foreign_key_columns": null, + "foreign_key_table": null, + "foreign_key_schema": null, + "foreign_key_table_is_partition": null, + "foreign_key_parent_schema": null, + "foreign_key_parent_table": null, + "foreign_key_effective_schema": null, + "foreign_key_effective_table": null, + "on_update": null, + "on_delete": null, + "match_type": null, + "check_expression": null, + "owner": "supabase_auth_admin", + "definition": "PRIMARY KEY (version)", + "comment": null } ], - "security_labels": [] - } - }, - "sequences": { - "sequence:auth.refresh_tokens_id_seq": { - "schema": "auth", - "name": "refresh_tokens_id_seq", - "data_type": "bigint", - "start_value": 1, - "minimum_value": "1", - "maximum_value": "9223372036854775807", - "increment": 1, - "cycle_option": false, - "cache_size": 1, - "persistence": "p", - "owned_by_schema": "auth", - "owned_by_table": "refresh_tokens", - "owned_by_column": "id", - "comment": null, "privileges": [ { - "grantee": "postgres", - "privilege": "SELECT", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "DELETE", + "grantable": false, + "columns": null }, { - "grantee": "postgres", - "privilege": "UPDATE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "INSERT", + "grantable": false, + "columns": null }, { - "grantee": "postgres", - "privilege": "USAGE", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null }, { "grantee": "supabase_auth_admin", - "privilege": "SELECT", - "grantable": false + "privilege": "REFERENCES", + "grantable": false, + "columns": null }, { "grantee": "supabase_auth_admin", - "privilege": "UPDATE", - "grantable": false + "privilege": "SELECT", + "grantable": false, + "columns": null }, { "grantee": "supabase_auth_admin", - "privilege": "USAGE", - "grantable": false + "privilege": "TRIGGER", + "grantable": false, + "columns": null }, { - "grantee": "dashboard_user", - "privilege": "SELECT", - "grantable": false + "grantee": "supabase_auth_admin", + "privilege": "TRUNCATE", + "grantable": false, + "columns": null }, { - "grantee": "dashboard_user", + "grantee": "supabase_auth_admin", "privilege": "UPDATE", - "grantable": false - }, - { - "grantee": "dashboard_user", - "privilege": "USAGE", - "grantable": false + "grantable": false, + "columns": null } ], - "owner": "supabase_auth_admin", "security_labels": [] - } - }, - "tables": { - "table:auth.audit_log_entries": { + }, + "table:auth.users": { "schema": "auth", - "name": "audit_log_entries", + "name": "users", "persistence": "p", "row_security": false, "force_row_security": false, @@ -5347,15 +8286,167 @@ "partition_bound": null, "partition_by": null, "owner": "supabase_auth_admin", - "comment": "Auth: Audit trail for user actions.", + "comment": "Auth: Stores user login data within a secure schema.", "parent_schema": null, "parent_name": null, "columns": [ { - "name": "instance_id", - "position": 1, - "data_type": "uuid", - "data_type_str": "uuid", + "name": "instance_id", + "position": 1, + "data_type": "uuid", + "data_type_str": "uuid", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "id", + "position": 2, + "data_type": "uuid", + "data_type_str": "uuid", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": true, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "aud", + "position": 3, + "data_type": "character varying", + "data_type_str": "character varying(255)", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "role", + "position": 4, + "data_type": "character varying", + "data_type_str": "character varying(255)", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "email", + "position": 5, + "data_type": "character varying", + "data_type_str": "character varying(255)", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "encrypted_password", + "position": 6, + "data_type": "character varying", + "data_type_str": "character varying(255)", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "confirmed_at", + "position": 7, + "data_type": "timestamp with time zone", + "data_type_str": "timestamp with time zone", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "invited_at", + "position": 8, + "data_type": "timestamp with time zone", + "data_type_str": "timestamp with time zone", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] + }, + { + "name": "confirmation_token", + "position": 9, + "data_type": "character varying", + "data_type_str": "character varying(255)", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, @@ -5371,16 +8462,16 @@ "security_labels": [] }, { - "name": "id", - "position": 2, - "data_type": "uuid", - "data_type_str": "uuid", + "name": "confirmation_sent_at", + "position": 10, + "data_type": "timestamp with time zone", + "data_type_str": "timestamp with time zone", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": true, + "not_null": false, "is_identity": false, "is_identity_always": false, "is_generated": false, @@ -5390,10 +8481,10 @@ "security_labels": [] }, { - "name": "payload", - "position": 3, - "data_type": "json", - "data_type_str": "json", + "name": "recovery_token", + "position": 11, + "data_type": "character varying", + "data_type_str": "character varying(255)", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, @@ -5409,8 +8500,8 @@ "security_labels": [] }, { - "name": "created_at", - "position": 4, + "name": "recovery_sent_at", + "position": 12, "data_type": "timestamp with time zone", "data_type_str": "timestamp with time zone", "is_custom_type": false, @@ -5426,224 +8517,94 @@ "default": null, "comment": null, "security_labels": [] - } - ], - "constraints": [ - { - "name": "audit_log_entries_pkey", - "constraint_type": "p", - "deferrable": false, - "initially_deferred": false, - "validated": true, - "is_local": true, - "no_inherit": true, - "is_temporal": false, - "is_partition_clone": false, - "parent_constraint_schema": null, - "parent_constraint_name": null, - "parent_table_schema": null, - "parent_table_name": null, - "key_columns": [ - "id" - ], - "foreign_key_columns": null, - "foreign_key_table": null, - "foreign_key_schema": null, - "foreign_key_table_is_partition": null, - "foreign_key_parent_schema": null, - "foreign_key_parent_table": null, - "foreign_key_effective_schema": null, - "foreign_key_effective_table": null, - "on_update": null, - "on_delete": null, - "match_type": null, - "check_expression": null, - "owner": "supabase_auth_admin", - "definition": "PRIMARY KEY (id)", - "comment": null - } - ], - "privileges": [ - { - "grantee": "postgres", - "privilege": "DELETE", - "grantable": false, - "columns": null - }, - { - "grantee": "postgres", - "privilege": "INSERT", - "grantable": false, - "columns": null - }, - { - "grantee": "postgres", - "privilege": "MAINTAIN", - "grantable": false, - "columns": null - }, - { - "grantee": "postgres", - "privilege": "REFERENCES", - "grantable": false, - "columns": null - }, - { - "grantee": "postgres", - "privilege": "SELECT", - "grantable": false, - "columns": null - }, - { - "grantee": "postgres", - "privilege": "TRIGGER", - "grantable": false, - "columns": null - }, - { - "grantee": "postgres", - "privilege": "TRUNCATE", - "grantable": false, - "columns": null - }, - { - "grantee": "postgres", - "privilege": "UPDATE", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "DELETE", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "INSERT", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "MAINTAIN", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "REFERENCES", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "SELECT", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "TRIGGER", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "TRUNCATE", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "UPDATE", - "grantable": false, - "columns": null - }, - { - "grantee": "dashboard_user", - "privilege": "DELETE", - "grantable": false, - "columns": null - }, - { - "grantee": "dashboard_user", - "privilege": "INSERT", - "grantable": false, - "columns": null - }, - { - "grantee": "dashboard_user", - "privilege": "MAINTAIN", - "grantable": false, - "columns": null }, { - "grantee": "dashboard_user", - "privilege": "REFERENCES", - "grantable": false, - "columns": null + "name": "email_change_token", + "position": 13, + "data_type": "character varying", + "data_type_str": "character varying(255)", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] }, { - "grantee": "dashboard_user", - "privilege": "SELECT", - "grantable": false, - "columns": null + "name": "email_change", + "position": 14, + "data_type": "character varying", + "data_type_str": "character varying(255)", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] }, { - "grantee": "dashboard_user", - "privilege": "TRIGGER", - "grantable": false, - "columns": null + "name": "email_change_sent_at", + "position": 15, + "data_type": "timestamp with time zone", + "data_type_str": "timestamp with time zone", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] }, { - "grantee": "dashboard_user", - "privilege": "TRUNCATE", - "grantable": false, - "columns": null + "name": "last_sign_in_at", + "position": 16, + "data_type": "timestamp with time zone", + "data_type_str": "timestamp with time zone", + "is_custom_type": false, + "custom_type_type": null, + "custom_type_category": null, + "custom_type_schema": null, + "custom_type_name": null, + "not_null": false, + "is_identity": false, + "is_identity_always": false, + "is_generated": false, + "collation": null, + "default": null, + "comment": null, + "security_labels": [] }, { - "grantee": "dashboard_user", - "privilege": "UPDATE", - "grantable": false, - "columns": null - } - ], - "security_labels": [] - }, - "table:auth.instances": { - "schema": "auth", - "name": "instances", - "persistence": "p", - "row_security": false, - "force_row_security": false, - "has_indexes": true, - "has_rules": false, - "has_triggers": false, - "has_subclasses": false, - "is_populated": true, - "replica_identity": "d", - "replica_identity_index": null, - "is_partition": false, - "options": null, - "partition_bound": null, - "partition_by": null, - "owner": "supabase_auth_admin", - "comment": "Auth: Manages users across multiple sites.", - "parent_schema": null, - "parent_name": null, - "columns": [ - { - "name": "id", - "position": 1, - "data_type": "uuid", - "data_type_str": "uuid", + "name": "raw_app_meta_data", + "position": 17, + "data_type": "jsonb", + "data_type_str": "jsonb", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": true, + "not_null": false, "is_identity": false, "is_identity_always": false, "is_generated": false, @@ -5653,10 +8614,10 @@ "security_labels": [] }, { - "name": "uuid", - "position": 2, - "data_type": "uuid", - "data_type_str": "uuid", + "name": "raw_user_meta_data", + "position": 18, + "data_type": "jsonb", + "data_type_str": "jsonb", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, @@ -5672,10 +8633,10 @@ "security_labels": [] }, { - "name": "raw_base_config", - "position": 3, - "data_type": "text", - "data_type_str": "text", + "name": "is_super_admin", + "position": 19, + "data_type": "boolean", + "data_type_str": "boolean", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, @@ -5692,7 +8653,7 @@ }, { "name": "created_at", - "position": 4, + "position": 20, "data_type": "timestamp with time zone", "data_type_str": "timestamp with time zone", "is_custom_type": false, @@ -5711,7 +8672,7 @@ }, { "name": "updated_at", - "position": 5, + "position": 21, "data_type": "timestamp with time zone", "data_type_str": "timestamp with time zone", "is_custom_type": false, @@ -5731,7 +8692,40 @@ ], "constraints": [ { - "name": "instances_pkey", + "name": "users_email_key", + "constraint_type": "u", + "deferrable": false, + "initially_deferred": false, + "validated": true, + "is_local": true, + "no_inherit": true, + "is_temporal": false, + "is_partition_clone": false, + "parent_constraint_schema": null, + "parent_constraint_name": null, + "parent_table_schema": null, + "parent_table_name": null, + "key_columns": [ + "email" + ], + "foreign_key_columns": null, + "foreign_key_table": null, + "foreign_key_schema": null, + "foreign_key_table_is_partition": null, + "foreign_key_parent_schema": null, + "foreign_key_parent_table": null, + "foreign_key_effective_schema": null, + "foreign_key_effective_table": null, + "on_update": null, + "on_delete": null, + "match_type": null, + "check_expression": null, + "owner": "supabase_auth_admin", + "definition": "UNIQUE (email)", + "comment": null + }, + { + "name": "users_pkey", "constraint_type": "p", "deferrable": false, "initially_deferred": false, @@ -5895,164 +8889,69 @@ "grantee": "dashboard_user", "privilege": "TRIGGER", "grantable": false, - "columns": null - }, - { - "grantee": "dashboard_user", - "privilege": "TRUNCATE", - "grantable": false, - "columns": null - }, - { - "grantee": "dashboard_user", - "privilege": "UPDATE", - "grantable": false, - "columns": null - } - ], - "security_labels": [] - }, - "table:auth.refresh_tokens": { - "schema": "auth", - "name": "refresh_tokens", - "persistence": "p", - "row_security": false, - "force_row_security": false, - "has_indexes": true, - "has_rules": false, - "has_triggers": false, - "has_subclasses": false, - "is_populated": true, - "replica_identity": "d", - "replica_identity_index": null, - "is_partition": false, - "options": null, - "partition_bound": null, - "partition_by": null, - "owner": "supabase_auth_admin", - "comment": "Auth: Store of tokens used to refresh JWT tokens once they expire.", - "parent_schema": null, - "parent_name": null, - "columns": [ - { - "name": "instance_id", - "position": 1, - "data_type": "uuid", - "data_type_str": "uuid", - "is_custom_type": false, - "custom_type_type": null, - "custom_type_category": null, - "custom_type_schema": null, - "custom_type_name": null, - "not_null": false, - "is_identity": false, - "is_identity_always": false, - "is_generated": false, - "collation": null, - "default": null, - "comment": null, - "security_labels": [] - }, - { - "name": "id", - "position": 2, - "data_type": "bigint", - "data_type_str": "bigint", - "is_custom_type": false, - "custom_type_type": null, - "custom_type_category": null, - "custom_type_schema": null, - "custom_type_name": null, - "not_null": true, - "is_identity": false, - "is_identity_always": false, - "is_generated": false, - "collation": null, - "default": "nextval('auth.refresh_tokens_id_seq'::regclass)", - "comment": null, - "security_labels": [] - }, - { - "name": "token", - "position": 3, - "data_type": "character varying", - "data_type_str": "character varying(255)", - "is_custom_type": false, - "custom_type_type": null, - "custom_type_category": null, - "custom_type_schema": null, - "custom_type_name": null, - "not_null": false, - "is_identity": false, - "is_identity_always": false, - "is_generated": false, - "collation": null, - "default": null, - "comment": null, - "security_labels": [] - }, - { - "name": "user_id", - "position": 4, - "data_type": "character varying", - "data_type_str": "character varying(255)", - "is_custom_type": false, - "custom_type_type": null, - "custom_type_category": null, - "custom_type_schema": null, - "custom_type_name": null, - "not_null": false, - "is_identity": false, - "is_identity_always": false, - "is_generated": false, - "collation": null, - "default": null, - "comment": null, - "security_labels": [] - }, - { - "name": "revoked", - "position": 5, - "data_type": "boolean", - "data_type_str": "boolean", - "is_custom_type": false, - "custom_type_type": null, - "custom_type_category": null, - "custom_type_schema": null, - "custom_type_name": null, - "not_null": false, - "is_identity": false, - "is_identity_always": false, - "is_generated": false, - "collation": null, - "default": null, - "comment": null, - "security_labels": [] + "columns": null }, { - "name": "created_at", - "position": 6, - "data_type": "timestamp with time zone", - "data_type_str": "timestamp with time zone", + "grantee": "dashboard_user", + "privilege": "TRUNCATE", + "grantable": false, + "columns": null + }, + { + "grantee": "dashboard_user", + "privilege": "UPDATE", + "grantable": false, + "columns": null + } + ], + "security_labels": [] + }, + "table:public.test_tenant": { + "schema": "public", + "name": "test_tenant", + "persistence": "p", + "row_security": false, + "force_row_security": false, + "has_indexes": true, + "has_rules": false, + "has_triggers": false, + "has_subclasses": false, + "is_populated": true, + "replica_identity": "d", + "replica_identity_index": null, + "is_partition": false, + "options": null, + "partition_bound": null, + "partition_by": null, + "owner": "supabase_admin", + "comment": null, + "parent_schema": null, + "parent_name": null, + "columns": [ + { + "name": "id", + "position": 1, + "data_type": "integer", + "data_type_str": "integer", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": false, + "not_null": true, "is_identity": false, "is_identity_always": false, "is_generated": false, "collation": null, - "default": null, + "default": "nextval('public.test_tenant_id_seq'::regclass)", "comment": null, "security_labels": [] }, { - "name": "updated_at", - "position": 7, - "data_type": "timestamp with time zone", - "data_type_str": "timestamp with time zone", + "name": "details", + "position": 2, + "data_type": "text", + "data_type_str": "text", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, @@ -6070,7 +8969,7 @@ ], "constraints": [ { - "name": "refresh_tokens_pkey", + "name": "test_tenant_pkey", "constraint_type": "p", "deferrable": false, "initially_deferred": false, @@ -6098,12 +8997,60 @@ "on_delete": null, "match_type": null, "check_expression": null, - "owner": "supabase_auth_admin", + "owner": "supabase_admin", "definition": "PRIMARY KEY (id)", "comment": null } ], "privileges": [ + { + "grantee": "supabase_admin", + "privilege": "DELETE", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_admin", + "privilege": "INSERT", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_admin", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_admin", + "privilege": "REFERENCES", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_admin", + "privilege": "SELECT", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_admin", + "privilege": "TRIGGER", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_admin", + "privilege": "TRUNCATE", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_admin", + "privilege": "UPDATE", + "grantable": false, + "columns": null + }, { "grantee": "postgres", "privilege": "DELETE", @@ -6153,226 +9100,193 @@ "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "anon", "privilege": "DELETE", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "anon", "privilege": "INSERT", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "anon", "privilege": "MAINTAIN", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "anon", "privilege": "REFERENCES", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "anon", "privilege": "SELECT", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "anon", "privilege": "TRIGGER", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "anon", "privilege": "TRUNCATE", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "anon", "privilege": "UPDATE", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "authenticated", "privilege": "DELETE", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "authenticated", "privilege": "INSERT", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "authenticated", "privilege": "MAINTAIN", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "authenticated", "privilege": "REFERENCES", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "authenticated", "privilege": "SELECT", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "authenticated", "privilege": "TRIGGER", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "authenticated", "privilege": "TRUNCATE", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "authenticated", "privilege": "UPDATE", "grantable": false, "columns": null - } - ], - "security_labels": [] - }, - "table:auth.schema_migrations": { - "schema": "auth", - "name": "schema_migrations", - "persistence": "p", - "row_security": false, - "force_row_security": false, - "has_indexes": true, - "has_rules": false, - "has_triggers": false, - "has_subclasses": false, - "is_populated": true, - "replica_identity": "d", - "replica_identity_index": null, - "is_partition": false, - "options": null, - "partition_bound": null, - "partition_by": null, - "owner": "supabase_auth_admin", - "comment": "Auth: Manages updates to the auth system.", - "parent_schema": null, - "parent_name": null, - "columns": [ + }, { - "name": "version", - "position": 1, - "data_type": "character varying", - "data_type_str": "character varying(255)", - "is_custom_type": false, - "custom_type_type": null, - "custom_type_category": null, - "custom_type_schema": null, - "custom_type_name": null, - "not_null": true, - "is_identity": false, - "is_identity_always": false, - "is_generated": false, - "collation": null, - "default": null, - "comment": null, - "security_labels": [] - } - ], - "constraints": [ + "grantee": "service_role", + "privilege": "DELETE", + "grantable": false, + "columns": null + }, { - "name": "schema_migrations_pkey", - "constraint_type": "p", - "deferrable": false, - "initially_deferred": false, - "validated": true, - "is_local": true, - "no_inherit": true, - "is_temporal": false, - "is_partition_clone": false, - "parent_constraint_schema": null, - "parent_constraint_name": null, - "parent_table_schema": null, - "parent_table_name": null, - "key_columns": [ - "version" - ], - "foreign_key_columns": null, - "foreign_key_table": null, - "foreign_key_schema": null, - "foreign_key_table_is_partition": null, - "foreign_key_parent_schema": null, - "foreign_key_parent_table": null, - "foreign_key_effective_schema": null, - "foreign_key_effective_table": null, - "on_update": null, - "on_delete": null, - "match_type": null, - "check_expression": null, - "owner": "supabase_auth_admin", - "definition": "PRIMARY KEY (version)", - "comment": null - } - ], - "privileges": [ + "grantee": "service_role", + "privilege": "INSERT", + "grantable": false, + "columns": null + }, + { + "grantee": "service_role", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null + }, + { + "grantee": "service_role", + "privilege": "REFERENCES", + "grantable": false, + "columns": null + }, + { + "grantee": "service_role", + "privilege": "SELECT", + "grantable": false, + "columns": null + }, + { + "grantee": "service_role", + "privilege": "TRIGGER", + "grantable": false, + "columns": null + }, + { + "grantee": "service_role", + "privilege": "TRUNCATE", + "grantable": false, + "columns": null + }, + { + "grantee": "service_role", + "privilege": "UPDATE", + "grantable": false, + "columns": null + }, { - "grantee": "supabase_auth_admin", + "grantee": "supabase_realtime_admin", "privilege": "DELETE", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "supabase_realtime_admin", "privilege": "INSERT", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "supabase_realtime_admin", "privilege": "MAINTAIN", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "supabase_realtime_admin", "privilege": "REFERENCES", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "supabase_realtime_admin", "privilege": "SELECT", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "supabase_realtime_admin", "privilege": "TRIGGER", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "supabase_realtime_admin", "privilege": "TRUNCATE", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", + "grantee": "supabase_realtime_admin", "privilege": "UPDATE", "grantable": false, "columns": null @@ -6380,11 +9294,11 @@ ], "security_labels": [] }, - "table:auth.users": { - "schema": "auth", - "name": "users", + "table:realtime.messages": { + "schema": "realtime", + "name": "messages", "persistence": "p", - "row_security": false, + "row_security": true, "force_row_security": false, "has_indexes": true, "has_rules": false, @@ -6396,23 +9310,23 @@ "is_partition": false, "options": null, "partition_bound": null, - "partition_by": null, - "owner": "supabase_auth_admin", - "comment": "Auth: Stores user login data within a secure schema.", + "partition_by": "RANGE (inserted_at)", + "owner": "supabase_realtime_admin", + "comment": null, "parent_schema": null, "parent_name": null, "columns": [ { - "name": "instance_id", - "position": 1, - "data_type": "uuid", - "data_type_str": "uuid", + "name": "topic", + "position": 3, + "data_type": "text", + "data_type_str": "text", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": false, + "not_null": true, "is_identity": false, "is_identity_always": false, "is_generated": false, @@ -6422,10 +9336,10 @@ "security_labels": [] }, { - "name": "id", - "position": 2, - "data_type": "uuid", - "data_type_str": "uuid", + "name": "extension", + "position": 4, + "data_type": "text", + "data_type_str": "text", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, @@ -6441,10 +9355,10 @@ "security_labels": [] }, { - "name": "aud", - "position": 3, - "data_type": "character varying", - "data_type_str": "character varying(255)", + "name": "payload", + "position": 5, + "data_type": "jsonb", + "data_type_str": "jsonb", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, @@ -6460,10 +9374,10 @@ "security_labels": [] }, { - "name": "role", - "position": 4, - "data_type": "character varying", - "data_type_str": "character varying(255)", + "name": "event", + "position": 6, + "data_type": "text", + "data_type_str": "text", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, @@ -6479,10 +9393,10 @@ "security_labels": [] }, { - "name": "email", - "position": 5, - "data_type": "character varying", - "data_type_str": "character varying(255)", + "name": "private", + "position": 7, + "data_type": "boolean", + "data_type_str": "boolean", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, @@ -6493,78 +9407,261 @@ "is_identity_always": false, "is_generated": false, "collation": null, - "default": null, + "default": "false", "comment": null, "security_labels": [] }, { - "name": "encrypted_password", - "position": 6, - "data_type": "character varying", - "data_type_str": "character varying(255)", + "name": "updated_at", + "position": 8, + "data_type": "timestamp without time zone", + "data_type_str": "timestamp without time zone", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": false, + "not_null": true, "is_identity": false, "is_identity_always": false, "is_generated": false, "collation": null, - "default": null, + "default": "now()", "comment": null, "security_labels": [] }, { - "name": "confirmed_at", - "position": 7, - "data_type": "timestamp with time zone", - "data_type_str": "timestamp with time zone", + "name": "inserted_at", + "position": 9, + "data_type": "timestamp without time zone", + "data_type_str": "timestamp without time zone", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": false, + "not_null": true, "is_identity": false, "is_identity_always": false, "is_generated": false, "collation": null, - "default": null, + "default": "now()", "comment": null, "security_labels": [] }, { - "name": "invited_at", - "position": 8, - "data_type": "timestamp with time zone", - "data_type_str": "timestamp with time zone", + "name": "id", + "position": 10, + "data_type": "uuid", + "data_type_str": "uuid", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": false, + "not_null": true, "is_identity": false, "is_identity_always": false, "is_generated": false, "collation": null, - "default": null, + "default": "gen_random_uuid()", "comment": null, "security_labels": [] + } + ], + "constraints": [ + { + "name": "messages_pkey", + "constraint_type": "p", + "deferrable": false, + "initially_deferred": false, + "validated": true, + "is_local": true, + "no_inherit": true, + "is_temporal": false, + "is_partition_clone": false, + "parent_constraint_schema": null, + "parent_constraint_name": null, + "parent_table_schema": null, + "parent_table_name": null, + "key_columns": [ + "id", + "inserted_at" + ], + "foreign_key_columns": null, + "foreign_key_table": null, + "foreign_key_schema": null, + "foreign_key_table_is_partition": null, + "foreign_key_parent_schema": null, + "foreign_key_parent_table": null, + "foreign_key_effective_schema": null, + "foreign_key_effective_table": null, + "on_update": null, + "on_delete": null, + "match_type": null, + "check_expression": null, + "owner": "supabase_realtime_admin", + "definition": "PRIMARY KEY (id, inserted_at)", + "comment": null + } + ], + "privileges": [ + { + "grantee": "postgres", + "privilege": "INSERT", + "grantable": false, + "columns": null }, { - "name": "confirmation_token", - "position": 9, - "data_type": "character varying", - "data_type_str": "character varying(255)", + "grantee": "postgres", + "privilege": "SELECT", + "grantable": false, + "columns": null + }, + { + "grantee": "postgres", + "privilege": "UPDATE", + "grantable": false, + "columns": null + }, + { + "grantee": "anon", + "privilege": "INSERT", + "grantable": false, + "columns": null + }, + { + "grantee": "anon", + "privilege": "SELECT", + "grantable": false, + "columns": null + }, + { + "grantee": "anon", + "privilege": "UPDATE", + "grantable": false, + "columns": null + }, + { + "grantee": "authenticated", + "privilege": "INSERT", + "grantable": false, + "columns": null + }, + { + "grantee": "authenticated", + "privilege": "SELECT", + "grantable": false, + "columns": null + }, + { + "grantee": "authenticated", + "privilege": "UPDATE", + "grantable": false, + "columns": null + }, + { + "grantee": "service_role", + "privilege": "INSERT", + "grantable": false, + "columns": null + }, + { + "grantee": "service_role", + "privilege": "SELECT", + "grantable": false, + "columns": null + }, + { + "grantee": "service_role", + "privilege": "UPDATE", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "DELETE", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "INSERT", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "REFERENCES", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "SELECT", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "TRIGGER", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "TRUNCATE", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "UPDATE", + "grantable": false, + "columns": null + } + ], + "security_labels": [] + }, + "table:realtime.schema_migrations": { + "schema": "realtime", + "name": "schema_migrations", + "persistence": "p", + "row_security": false, + "force_row_security": false, + "has_indexes": true, + "has_rules": false, + "has_triggers": false, + "has_subclasses": false, + "is_populated": true, + "replica_identity": "d", + "replica_identity_index": null, + "is_partition": false, + "options": null, + "partition_bound": null, + "partition_by": null, + "owner": "supabase_realtime_admin", + "comment": null, + "parent_schema": null, + "parent_name": null, + "columns": [ + { + "name": "version", + "position": 1, + "data_type": "bigint", + "data_type_str": "bigint", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": false, + "not_null": true, "is_identity": false, "is_identity_always": false, "is_generated": false, @@ -6574,10 +9671,10 @@ "security_labels": [] }, { - "name": "confirmation_sent_at", - "position": 10, - "data_type": "timestamp with time zone", - "data_type_str": "timestamp with time zone", + "name": "inserted_at", + "position": 2, + "data_type": "timestamp without time zone", + "data_type_str": "timestamp(0) without time zone", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, @@ -6591,77 +9688,154 @@ "default": null, "comment": null, "security_labels": [] + } + ], + "constraints": [ + { + "name": "schema_migrations_pkey", + "constraint_type": "p", + "deferrable": false, + "initially_deferred": false, + "validated": true, + "is_local": true, + "no_inherit": true, + "is_temporal": false, + "is_partition_clone": false, + "parent_constraint_schema": null, + "parent_constraint_name": null, + "parent_table_schema": null, + "parent_table_name": null, + "key_columns": [ + "version" + ], + "foreign_key_columns": null, + "foreign_key_table": null, + "foreign_key_schema": null, + "foreign_key_table_is_partition": null, + "foreign_key_parent_schema": null, + "foreign_key_parent_table": null, + "foreign_key_effective_schema": null, + "foreign_key_effective_table": null, + "on_update": null, + "on_delete": null, + "match_type": null, + "check_expression": null, + "owner": "supabase_realtime_admin", + "definition": "PRIMARY KEY (version)", + "comment": null + } + ], + "privileges": [ + { + "grantee": "postgres", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "name": "recovery_token", - "position": 11, - "data_type": "character varying", - "data_type_str": "character varying(255)", - "is_custom_type": false, - "custom_type_type": null, - "custom_type_category": null, - "custom_type_schema": null, - "custom_type_name": null, - "not_null": false, - "is_identity": false, - "is_identity_always": false, - "is_generated": false, - "collation": null, - "default": null, - "comment": null, - "security_labels": [] + "grantee": "anon", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "name": "recovery_sent_at", - "position": 12, - "data_type": "timestamp with time zone", - "data_type_str": "timestamp with time zone", - "is_custom_type": false, - "custom_type_type": null, - "custom_type_category": null, - "custom_type_schema": null, - "custom_type_name": null, - "not_null": false, - "is_identity": false, - "is_identity_always": false, - "is_generated": false, - "collation": null, - "default": null, - "comment": null, - "security_labels": [] + "grantee": "authenticated", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "name": "email_change_token", - "position": 13, - "data_type": "character varying", - "data_type_str": "character varying(255)", - "is_custom_type": false, - "custom_type_type": null, - "custom_type_category": null, - "custom_type_schema": null, - "custom_type_name": null, - "not_null": false, - "is_identity": false, - "is_identity_always": false, - "is_generated": false, - "collation": null, - "default": null, - "comment": null, - "security_labels": [] + "grantee": "service_role", + "privilege": "SELECT", + "grantable": false, + "columns": null }, { - "name": "email_change", - "position": 14, - "data_type": "character varying", - "data_type_str": "character varying(255)", + "grantee": "supabase_realtime_admin", + "privilege": "DELETE", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "INSERT", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "MAINTAIN", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "REFERENCES", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "SELECT", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "TRIGGER", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "TRUNCATE", + "grantable": false, + "columns": null + }, + { + "grantee": "supabase_realtime_admin", + "privilege": "UPDATE", + "grantable": false, + "columns": null + } + ], + "security_labels": [] + }, + "table:realtime.subscription": { + "schema": "realtime", + "name": "subscription", + "persistence": "p", + "row_security": false, + "force_row_security": false, + "has_indexes": true, + "has_rules": false, + "has_triggers": true, + "has_subclasses": false, + "is_populated": true, + "replica_identity": "d", + "replica_identity_index": null, + "is_partition": false, + "options": null, + "partition_bound": null, + "partition_by": null, + "owner": "supabase_realtime_admin", + "comment": null, + "parent_schema": null, + "parent_name": null, + "columns": [ + { + "name": "id", + "position": 1, + "data_type": "bigint", + "data_type_str": "bigint", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": false, - "is_identity": false, - "is_identity_always": false, + "not_null": true, + "is_identity": true, + "is_identity_always": true, "is_generated": false, "collation": null, "default": null, @@ -6669,16 +9843,16 @@ "security_labels": [] }, { - "name": "email_change_sent_at", - "position": 15, - "data_type": "timestamp with time zone", - "data_type_str": "timestamp with time zone", + "name": "subscription_id", + "position": 2, + "data_type": "uuid", + "data_type_str": "uuid", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": false, + "not_null": true, "is_identity": false, "is_identity_always": false, "is_generated": false, @@ -6688,16 +9862,16 @@ "security_labels": [] }, { - "name": "last_sign_in_at", - "position": 16, - "data_type": "timestamp with time zone", - "data_type_str": "timestamp with time zone", + "name": "entity", + "position": 4, + "data_type": "regclass", + "data_type_str": "regclass", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": false, + "not_null": true, "is_identity": false, "is_identity_always": false, "is_generated": false, @@ -6707,27 +9881,27 @@ "security_labels": [] }, { - "name": "raw_app_meta_data", - "position": 17, - "data_type": "jsonb", - "data_type_str": "jsonb", - "is_custom_type": false, - "custom_type_type": null, - "custom_type_category": null, - "custom_type_schema": null, - "custom_type_name": null, - "not_null": false, + "name": "filters", + "position": 5, + "data_type": "realtime.user_defined_filter[]", + "data_type_str": "realtime.user_defined_filter[]", + "is_custom_type": true, + "custom_type_type": "b", + "custom_type_category": "A", + "custom_type_schema": "realtime", + "custom_type_name": "_user_defined_filter", + "not_null": true, "is_identity": false, "is_identity_always": false, "is_generated": false, "collation": null, - "default": null, + "default": "'{}'::realtime.user_defined_filter[]", "comment": null, "security_labels": [] }, { - "name": "raw_user_meta_data", - "position": 18, + "name": "claims", + "position": 7, "data_type": "jsonb", "data_type_str": "jsonb", "is_custom_type": false, @@ -6735,7 +9909,7 @@ "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": false, + "not_null": true, "is_identity": false, "is_identity_always": false, "is_generated": false, @@ -6745,48 +9919,48 @@ "security_labels": [] }, { - "name": "is_super_admin", - "position": 19, - "data_type": "boolean", - "data_type_str": "boolean", + "name": "claims_role", + "position": 8, + "data_type": "regrole", + "data_type_str": "regrole", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": false, + "not_null": true, "is_identity": false, "is_identity_always": false, - "is_generated": false, + "is_generated": true, "collation": null, - "default": null, + "default": "realtime.to_regrole((claims ->> 'role'::text))", "comment": null, "security_labels": [] }, { "name": "created_at", - "position": 20, - "data_type": "timestamp with time zone", - "data_type_str": "timestamp with time zone", + "position": 9, + "data_type": "timestamp without time zone", + "data_type_str": "timestamp without time zone", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, "custom_type_schema": null, "custom_type_name": null, - "not_null": false, + "not_null": true, "is_identity": false, "is_identity_always": false, "is_generated": false, "collation": null, - "default": null, + "default": "timezone('utc'::text, now())", "comment": null, "security_labels": [] }, { - "name": "updated_at", - "position": 21, - "data_type": "timestamp with time zone", - "data_type_str": "timestamp with time zone", + "name": "action_filter", + "position": 10, + "data_type": "text", + "data_type_str": "text", "is_custom_type": false, "custom_type_type": null, "custom_type_category": null, @@ -6797,15 +9971,15 @@ "is_identity_always": false, "is_generated": false, "collation": null, - "default": null, + "default": "'*'::text", "comment": null, "security_labels": [] } ], "constraints": [ { - "name": "users_email_key", - "constraint_type": "u", + "name": "pk_subscription", + "constraint_type": "p", "deferrable": false, "initially_deferred": false, "validated": true, @@ -6818,7 +9992,7 @@ "parent_table_schema": null, "parent_table_name": null, "key_columns": [ - "email" + "id" ], "foreign_key_columns": null, "foreign_key_table": null, @@ -6831,19 +10005,19 @@ "on_update": null, "on_delete": null, "match_type": null, - "check_expression": null, - "owner": "supabase_auth_admin", - "definition": "UNIQUE (email)", + "check_expression": null, + "owner": "supabase_realtime_admin", + "definition": "PRIMARY KEY (id)", "comment": null }, { - "name": "users_pkey", - "constraint_type": "p", + "name": "subscription_action_filter_check", + "constraint_type": "c", "deferrable": false, "initially_deferred": false, "validated": true, "is_local": true, - "no_inherit": true, + "no_inherit": false, "is_temporal": false, "is_partition_clone": false, "parent_constraint_schema": null, @@ -6851,7 +10025,7 @@ "parent_table_schema": null, "parent_table_name": null, "key_columns": [ - "id" + "action_filter" ], "foreign_key_columns": null, "foreign_key_table": null, @@ -6864,37 +10038,13 @@ "on_update": null, "on_delete": null, "match_type": null, - "check_expression": null, - "owner": "supabase_auth_admin", - "definition": "PRIMARY KEY (id)", + "check_expression": "(action_filter = ANY (ARRAY['*'::text, 'INSERT'::text, 'UPDATE'::text, 'DELETE'::text]))", + "owner": "supabase_realtime_admin", + "definition": "CHECK (action_filter = ANY (ARRAY['*'::text, 'INSERT'::text, 'UPDATE'::text, 'DELETE'::text]))", "comment": null } ], "privileges": [ - { - "grantee": "postgres", - "privilege": "DELETE", - "grantable": false, - "columns": null - }, - { - "grantee": "postgres", - "privilege": "INSERT", - "grantable": false, - "columns": null - }, - { - "grantee": "postgres", - "privilege": "MAINTAIN", - "grantable": false, - "columns": null - }, - { - "grantee": "postgres", - "privilege": "REFERENCES", - "grantable": false, - "columns": null - }, { "grantee": "postgres", "privilege": "SELECT", @@ -6902,115 +10052,67 @@ "columns": null }, { - "grantee": "postgres", - "privilege": "TRIGGER", - "grantable": false, - "columns": null - }, - { - "grantee": "postgres", - "privilege": "TRUNCATE", - "grantable": false, - "columns": null - }, - { - "grantee": "postgres", - "privilege": "UPDATE", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "DELETE", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "INSERT", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "MAINTAIN", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "REFERENCES", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", + "grantee": "anon", "privilege": "SELECT", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", - "privilege": "TRIGGER", - "grantable": false, - "columns": null - }, - { - "grantee": "supabase_auth_admin", - "privilege": "TRUNCATE", + "grantee": "authenticated", + "privilege": "SELECT", "grantable": false, "columns": null }, { - "grantee": "supabase_auth_admin", - "privilege": "UPDATE", + "grantee": "service_role", + "privilege": "SELECT", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "supabase_realtime_admin", "privilege": "DELETE", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "supabase_realtime_admin", "privilege": "INSERT", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "supabase_realtime_admin", "privilege": "MAINTAIN", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "supabase_realtime_admin", "privilege": "REFERENCES", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "supabase_realtime_admin", "privilege": "SELECT", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "supabase_realtime_admin", "privilege": "TRIGGER", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "supabase_realtime_admin", "privilege": "TRUNCATE", "grantable": false, "columns": null }, { - "grantee": "dashboard_user", + "grantee": "supabase_realtime_admin", "privilege": "UPDATE", "grantable": false, "columns": null @@ -7019,7 +10121,35 @@ "security_labels": [] } }, - "triggers": {}, + "triggers": { + "trigger:realtime.subscription.tr_check_filters": { + "schema": "realtime", + "name": "tr_check_filters", + "table_name": "subscription", + "table_relkind": "r", + "function_schema": "realtime", + "function_name": "subscription_check_filters", + "trigger_type": 23, + "enabled": "O", + "is_internal": false, + "deferrable": false, + "initially_deferred": false, + "argument_count": 0, + "column_numbers": [], + "arguments": [], + "when_condition": null, + "old_table": null, + "new_table": null, + "is_partition_clone": false, + "parent_trigger_name": null, + "parent_table_schema": null, + "parent_table_name": null, + "is_on_partitioned_table": false, + "owner": "supabase_realtime_admin", + "definition": "CREATE TRIGGER tr_check_filters BEFORE INSERT OR UPDATE ON realtime.subscription FOR EACH ROW EXECUTE FUNCTION realtime.subscription_check_filters()", + "comment": null + } + }, "eventTriggers": { "eventTrigger:issue_graphql_placeholder": { "name": "issue_graphql_placeholder", @@ -7034,924 +10164,1834 @@ "comment": null, "security_labels": [] }, - "eventTrigger:issue_pg_cron_access": { - "name": "issue_pg_cron_access", - "event": "ddl_command_end", - "function_schema": "extensions", - "function_name": "grant_pg_cron_access", - "enabled": "O", - "tags": [ - "CREATE EXTENSION" - ], - "owner": "supabase_admin", - "comment": null, - "security_labels": [] + "eventTrigger:issue_pg_cron_access": { + "name": "issue_pg_cron_access", + "event": "ddl_command_end", + "function_schema": "extensions", + "function_name": "grant_pg_cron_access", + "enabled": "O", + "tags": [ + "CREATE EXTENSION" + ], + "owner": "supabase_admin", + "comment": null, + "security_labels": [] + }, + "eventTrigger:issue_pg_graphql_access": { + "name": "issue_pg_graphql_access", + "event": "ddl_command_end", + "function_schema": "extensions", + "function_name": "grant_pg_graphql_access", + "enabled": "O", + "tags": [ + "CREATE FUNCTION" + ], + "owner": "supabase_admin", + "comment": null, + "security_labels": [] + }, + "eventTrigger:issue_pg_net_access": { + "name": "issue_pg_net_access", + "event": "ddl_command_end", + "function_schema": "extensions", + "function_name": "grant_pg_net_access", + "enabled": "O", + "tags": [ + "CREATE EXTENSION" + ], + "owner": "supabase_admin", + "comment": null, + "security_labels": [] + }, + "eventTrigger:pgrst_ddl_watch": { + "name": "pgrst_ddl_watch", + "event": "ddl_command_end", + "function_schema": "extensions", + "function_name": "pgrst_ddl_watch", + "enabled": "O", + "tags": null, + "owner": "supabase_admin", + "comment": null, + "security_labels": [] + }, + "eventTrigger:pgrst_drop_watch": { + "name": "pgrst_drop_watch", + "event": "sql_drop", + "function_schema": "extensions", + "function_name": "pgrst_drop_watch", + "enabled": "O", + "tags": null, + "owner": "supabase_admin", + "comment": null, + "security_labels": [] + } + }, + "rules": {}, + "ranges": {}, + "views": {}, + "foreignDataWrappers": {}, + "servers": {}, + "userMappings": {}, + "foreignTables": {}, + "depends": [ + { + "dependent_stable_id": "acl:procedure:auth.email()::grantee:dashboard_user", + "referenced_stable_id": "procedure:auth.email()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.email()::grantee:dashboard_user", + "referenced_stable_id": "role:dashboard_user", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.email()::grantee:PUBLIC", + "referenced_stable_id": "procedure:auth.email()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.email()::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.email()::grantee:supabase_auth_admin", + "referenced_stable_id": "procedure:auth.email()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.email()::grantee:supabase_auth_admin", + "referenced_stable_id": "role:supabase_auth_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.email()::grantee:supabase_realtime_admin", + "referenced_stable_id": "procedure:auth.email()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.email()::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.role()::grantee:dashboard_user", + "referenced_stable_id": "procedure:auth.role()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.role()::grantee:dashboard_user", + "referenced_stable_id": "role:dashboard_user", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.role()::grantee:PUBLIC", + "referenced_stable_id": "procedure:auth.role()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.role()::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.role()::grantee:supabase_auth_admin", + "referenced_stable_id": "procedure:auth.role()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.role()::grantee:supabase_auth_admin", + "referenced_stable_id": "role:supabase_auth_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.role()::grantee:supabase_realtime_admin", + "referenced_stable_id": "procedure:auth.role()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.role()::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.uid()::grantee:dashboard_user", + "referenced_stable_id": "procedure:auth.uid()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.uid()::grantee:dashboard_user", + "referenced_stable_id": "role:dashboard_user", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.uid()::grantee:PUBLIC", + "referenced_stable_id": "procedure:auth.uid()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.uid()::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.uid()::grantee:supabase_auth_admin", + "referenced_stable_id": "procedure:auth.uid()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.uid()::grantee:supabase_auth_admin", + "referenced_stable_id": "role:supabase_auth_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.uid()::grantee:supabase_realtime_admin", + "referenced_stable_id": "procedure:auth.uid()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:auth.uid()::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_cron_access()::grantee:dashboard_user", + "referenced_stable_id": "procedure:extensions.grant_pg_cron_access()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_cron_access()::grantee:dashboard_user", + "referenced_stable_id": "role:dashboard_user", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_cron_access()::grantee:PUBLIC", + "referenced_stable_id": "procedure:extensions.grant_pg_cron_access()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_cron_access()::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_cron_access()::grantee:supabase_admin", + "referenced_stable_id": "procedure:extensions.grant_pg_cron_access()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_cron_access()::grantee:supabase_admin", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_graphql_access()::grantee:postgres", + "referenced_stable_id": "procedure:extensions.grant_pg_graphql_access()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_graphql_access()::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_graphql_access()::grantee:PUBLIC", + "referenced_stable_id": "procedure:extensions.grant_pg_graphql_access()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_graphql_access()::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_graphql_access()::grantee:supabase_admin", + "referenced_stable_id": "procedure:extensions.grant_pg_graphql_access()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_graphql_access()::grantee:supabase_admin", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_net_access()::grantee:dashboard_user", + "referenced_stable_id": "procedure:extensions.grant_pg_net_access()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_net_access()::grantee:dashboard_user", + "referenced_stable_id": "role:dashboard_user", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_net_access()::grantee:PUBLIC", + "referenced_stable_id": "procedure:extensions.grant_pg_net_access()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_net_access()::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_net_access()::grantee:supabase_admin", + "referenced_stable_id": "procedure:extensions.grant_pg_net_access()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.grant_pg_net_access()::grantee:supabase_admin", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.pgrst_ddl_watch()::grantee:postgres", + "referenced_stable_id": "procedure:extensions.pgrst_ddl_watch()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.pgrst_ddl_watch()::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.pgrst_ddl_watch()::grantee:PUBLIC", + "referenced_stable_id": "procedure:extensions.pgrst_ddl_watch()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.pgrst_ddl_watch()::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.pgrst_ddl_watch()::grantee:supabase_admin", + "referenced_stable_id": "procedure:extensions.pgrst_ddl_watch()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.pgrst_ddl_watch()::grantee:supabase_admin", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.pgrst_drop_watch()::grantee:postgres", + "referenced_stable_id": "procedure:extensions.pgrst_drop_watch()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.pgrst_drop_watch()::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.pgrst_drop_watch()::grantee:PUBLIC", + "referenced_stable_id": "procedure:extensions.pgrst_drop_watch()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.pgrst_drop_watch()::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.pgrst_drop_watch()::grantee:supabase_admin", + "referenced_stable_id": "procedure:extensions.pgrst_drop_watch()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.pgrst_drop_watch()::grantee:supabase_admin", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.set_graphql_placeholder()::grantee:postgres", + "referenced_stable_id": "procedure:extensions.set_graphql_placeholder()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.set_graphql_placeholder()::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.set_graphql_placeholder()::grantee:PUBLIC", + "referenced_stable_id": "procedure:extensions.set_graphql_placeholder()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.set_graphql_placeholder()::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.set_graphql_placeholder()::grantee:supabase_admin", + "referenced_stable_id": "procedure:extensions.set_graphql_placeholder()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:extensions.set_graphql_placeholder()::grantee:supabase_admin", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:pgbouncer.get_auth(text)::grantee:pgbouncer", + "referenced_stable_id": "procedure:pgbouncer.get_auth(text)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:pgbouncer.get_auth(text)::grantee:pgbouncer", + "referenced_stable_id": "role:pgbouncer", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:pgbouncer.get_auth(text)::grantee:supabase_admin", + "referenced_stable_id": "procedure:pgbouncer.get_auth(text)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:pgbouncer.get_auth(text)::grantee:supabase_admin", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.\"cast\"(text,regtype)::grantee:anon", + "referenced_stable_id": "procedure:realtime.\"cast\"(text,regtype)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.\"cast\"(text,regtype)::grantee:anon", + "referenced_stable_id": "role:anon", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.\"cast\"(text,regtype)::grantee:authenticated", + "referenced_stable_id": "procedure:realtime.\"cast\"(text,regtype)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.\"cast\"(text,regtype)::grantee:authenticated", + "referenced_stable_id": "role:authenticated", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.\"cast\"(text,regtype)::grantee:postgres", + "referenced_stable_id": "procedure:realtime.\"cast\"(text,regtype)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.\"cast\"(text,regtype)::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.\"cast\"(text,regtype)::grantee:PUBLIC", + "referenced_stable_id": "procedure:realtime.\"cast\"(text,regtype)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.\"cast\"(text,regtype)::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.\"cast\"(text,regtype)::grantee:service_role", + "referenced_stable_id": "procedure:realtime.\"cast\"(text,regtype)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.\"cast\"(text,regtype)::grantee:service_role", + "referenced_stable_id": "role:service_role", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.\"cast\"(text,regtype)::grantee:supabase_realtime_admin", + "referenced_stable_id": "procedure:realtime.\"cast\"(text,regtype)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.\"cast\"(text,regtype)::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.apply_rls(jsonb,integer)::grantee:anon", + "referenced_stable_id": "procedure:realtime.apply_rls(jsonb,integer)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.apply_rls(jsonb,integer)::grantee:anon", + "referenced_stable_id": "role:anon", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.apply_rls(jsonb,integer)::grantee:authenticated", + "referenced_stable_id": "procedure:realtime.apply_rls(jsonb,integer)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.apply_rls(jsonb,integer)::grantee:authenticated", + "referenced_stable_id": "role:authenticated", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.apply_rls(jsonb,integer)::grantee:postgres", + "referenced_stable_id": "procedure:realtime.apply_rls(jsonb,integer)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.apply_rls(jsonb,integer)::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.apply_rls(jsonb,integer)::grantee:PUBLIC", + "referenced_stable_id": "procedure:realtime.apply_rls(jsonb,integer)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.apply_rls(jsonb,integer)::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.apply_rls(jsonb,integer)::grantee:service_role", + "referenced_stable_id": "procedure:realtime.apply_rls(jsonb,integer)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.apply_rls(jsonb,integer)::grantee:service_role", + "referenced_stable_id": "role:service_role", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.apply_rls(jsonb,integer)::grantee:supabase_realtime_admin", + "referenced_stable_id": "procedure:realtime.apply_rls(jsonb,integer)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.apply_rls(jsonb,integer)::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])::grantee:anon", + "referenced_stable_id": "procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])::grantee:anon", + "referenced_stable_id": "role:anon", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])::grantee:authenticated", + "referenced_stable_id": "procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])::grantee:authenticated", + "referenced_stable_id": "role:authenticated", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])::grantee:postgres", + "referenced_stable_id": "procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])::grantee:PUBLIC", + "referenced_stable_id": "procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])::grantee:service_role", + "referenced_stable_id": "procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])::grantee:service_role", + "referenced_stable_id": "role:service_role", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])::grantee:supabase_realtime_admin", + "referenced_stable_id": "procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)::grantee:anon", + "referenced_stable_id": "procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)::grantee:anon", + "referenced_stable_id": "role:anon", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)::grantee:authenticated", + "referenced_stable_id": "procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)::grantee:authenticated", + "referenced_stable_id": "role:authenticated", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)::grantee:postgres", + "referenced_stable_id": "procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)::grantee:PUBLIC", + "referenced_stable_id": "procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)::grantee:service_role", + "referenced_stable_id": "procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)::grantee:service_role", + "referenced_stable_id": "role:service_role", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)::grantee:supabase_realtime_admin", + "referenced_stable_id": "procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])::grantee:anon", + "referenced_stable_id": "procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])::grantee:anon", + "referenced_stable_id": "role:anon", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])::grantee:authenticated", + "referenced_stable_id": "procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])::grantee:authenticated", + "referenced_stable_id": "role:authenticated", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])::grantee:postgres", + "referenced_stable_id": "procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])::grantee:PUBLIC", + "referenced_stable_id": "procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])::grantee:service_role", + "referenced_stable_id": "procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])::grantee:service_role", + "referenced_stable_id": "role:service_role", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])::grantee:supabase_realtime_admin", + "referenced_stable_id": "procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.quote_wal2json(regclass)::grantee:anon", + "referenced_stable_id": "procedure:realtime.quote_wal2json(regclass)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.quote_wal2json(regclass)::grantee:anon", + "referenced_stable_id": "role:anon", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.quote_wal2json(regclass)::grantee:authenticated", + "referenced_stable_id": "procedure:realtime.quote_wal2json(regclass)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.quote_wal2json(regclass)::grantee:authenticated", + "referenced_stable_id": "role:authenticated", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.quote_wal2json(regclass)::grantee:postgres", + "referenced_stable_id": "procedure:realtime.quote_wal2json(regclass)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.quote_wal2json(regclass)::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.quote_wal2json(regclass)::grantee:PUBLIC", + "referenced_stable_id": "procedure:realtime.quote_wal2json(regclass)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.quote_wal2json(regclass)::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.quote_wal2json(regclass)::grantee:service_role", + "referenced_stable_id": "procedure:realtime.quote_wal2json(regclass)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.quote_wal2json(regclass)::grantee:service_role", + "referenced_stable_id": "role:service_role", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.quote_wal2json(regclass)::grantee:supabase_realtime_admin", + "referenced_stable_id": "procedure:realtime.quote_wal2json(regclass)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.quote_wal2json(regclass)::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.subscription_check_filters()::grantee:anon", + "referenced_stable_id": "procedure:realtime.subscription_check_filters()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.subscription_check_filters()::grantee:anon", + "referenced_stable_id": "role:anon", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.subscription_check_filters()::grantee:authenticated", + "referenced_stable_id": "procedure:realtime.subscription_check_filters()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.subscription_check_filters()::grantee:authenticated", + "referenced_stable_id": "role:authenticated", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.subscription_check_filters()::grantee:postgres", + "referenced_stable_id": "procedure:realtime.subscription_check_filters()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.subscription_check_filters()::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.subscription_check_filters()::grantee:PUBLIC", + "referenced_stable_id": "procedure:realtime.subscription_check_filters()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.subscription_check_filters()::grantee:PUBLIC", + "referenced_stable_id": "role:PUBLIC", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.subscription_check_filters()::grantee:service_role", + "referenced_stable_id": "procedure:realtime.subscription_check_filters()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.subscription_check_filters()::grantee:service_role", + "referenced_stable_id": "role:service_role", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.subscription_check_filters()::grantee:supabase_realtime_admin", + "referenced_stable_id": "procedure:realtime.subscription_check_filters()", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.subscription_check_filters()::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" }, - "eventTrigger:issue_pg_graphql_access": { - "name": "issue_pg_graphql_access", - "event": "ddl_command_end", - "function_schema": "extensions", - "function_name": "grant_pg_graphql_access", - "enabled": "O", - "tags": [ - "CREATE FUNCTION" - ], - "owner": "supabase_admin", - "comment": null, - "security_labels": [] + { + "dependent_stable_id": "acl:procedure:realtime.to_regrole(text)::grantee:anon", + "referenced_stable_id": "procedure:realtime.to_regrole(text)", + "deptype": "n" }, - "eventTrigger:issue_pg_net_access": { - "name": "issue_pg_net_access", - "event": "ddl_command_end", - "function_schema": "extensions", - "function_name": "grant_pg_net_access", - "enabled": "O", - "tags": [ - "CREATE EXTENSION" - ], - "owner": "supabase_admin", - "comment": null, - "security_labels": [] + { + "dependent_stable_id": "acl:procedure:realtime.to_regrole(text)::grantee:anon", + "referenced_stable_id": "role:anon", + "deptype": "n" }, - "eventTrigger:pgrst_ddl_watch": { - "name": "pgrst_ddl_watch", - "event": "ddl_command_end", - "function_schema": "extensions", - "function_name": "pgrst_ddl_watch", - "enabled": "O", - "tags": null, - "owner": "supabase_admin", - "comment": null, - "security_labels": [] + { + "dependent_stable_id": "acl:procedure:realtime.to_regrole(text)::grantee:authenticated", + "referenced_stable_id": "procedure:realtime.to_regrole(text)", + "deptype": "n" }, - "eventTrigger:pgrst_drop_watch": { - "name": "pgrst_drop_watch", - "event": "sql_drop", - "function_schema": "extensions", - "function_name": "pgrst_drop_watch", - "enabled": "O", - "tags": null, - "owner": "supabase_admin", - "comment": null, - "security_labels": [] - } - }, - "rules": {}, - "ranges": {}, - "views": {}, - "foreignDataWrappers": {}, - "servers": {}, - "userMappings": {}, - "foreignTables": {}, - "depends": [ { - "dependent_stable_id": "acl:procedure:auth.email()::grantee:dashboard_user", - "referenced_stable_id": "procedure:auth.email()", + "dependent_stable_id": "acl:procedure:realtime.to_regrole(text)::grantee:authenticated", + "referenced_stable_id": "role:authenticated", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.email()::grantee:dashboard_user", - "referenced_stable_id": "role:dashboard_user", + "dependent_stable_id": "acl:procedure:realtime.to_regrole(text)::grantee:postgres", + "referenced_stable_id": "procedure:realtime.to_regrole(text)", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.email()::grantee:PUBLIC", - "referenced_stable_id": "procedure:auth.email()", + "dependent_stable_id": "acl:procedure:realtime.to_regrole(text)::grantee:postgres", + "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.email()::grantee:PUBLIC", + "dependent_stable_id": "acl:procedure:realtime.to_regrole(text)::grantee:PUBLIC", + "referenced_stable_id": "procedure:realtime.to_regrole(text)", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:procedure:realtime.to_regrole(text)::grantee:PUBLIC", "referenced_stable_id": "role:PUBLIC", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.email()::grantee:supabase_auth_admin", - "referenced_stable_id": "procedure:auth.email()", + "dependent_stable_id": "acl:procedure:realtime.to_regrole(text)::grantee:service_role", + "referenced_stable_id": "procedure:realtime.to_regrole(text)", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.email()::grantee:supabase_auth_admin", - "referenced_stable_id": "role:supabase_auth_admin", + "dependent_stable_id": "acl:procedure:realtime.to_regrole(text)::grantee:service_role", + "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.role()::grantee:dashboard_user", - "referenced_stable_id": "procedure:auth.role()", + "dependent_stable_id": "acl:procedure:realtime.to_regrole(text)::grantee:supabase_realtime_admin", + "referenced_stable_id": "procedure:realtime.to_regrole(text)", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.role()::grantee:dashboard_user", + "dependent_stable_id": "acl:procedure:realtime.to_regrole(text)::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:_realtime::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:_realtime::grantee:postgres", + "referenced_stable_id": "schema:_realtime", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:_realtime::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:_realtime::grantee:supabase_realtime_admin", + "referenced_stable_id": "schema:_realtime", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:auth::grantee:anon", + "referenced_stable_id": "role:anon", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:auth::grantee:anon", + "referenced_stable_id": "schema:auth", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:auth::grantee:authenticated", + "referenced_stable_id": "role:authenticated", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:auth::grantee:authenticated", + "referenced_stable_id": "schema:auth", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:auth::grantee:dashboard_user", "referenced_stable_id": "role:dashboard_user", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.role()::grantee:PUBLIC", - "referenced_stable_id": "procedure:auth.role()", + "dependent_stable_id": "acl:schema:auth::grantee:dashboard_user", + "referenced_stable_id": "schema:auth", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.role()::grantee:PUBLIC", - "referenced_stable_id": "role:PUBLIC", + "dependent_stable_id": "acl:schema:auth::grantee:postgres", + "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.role()::grantee:supabase_auth_admin", - "referenced_stable_id": "procedure:auth.role()", + "dependent_stable_id": "acl:schema:auth::grantee:postgres", + "referenced_stable_id": "schema:auth", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.role()::grantee:supabase_auth_admin", + "dependent_stable_id": "acl:schema:auth::grantee:service_role", + "referenced_stable_id": "role:service_role", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:auth::grantee:service_role", + "referenced_stable_id": "schema:auth", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:auth::grantee:supabase_admin", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:auth::grantee:supabase_admin", + "referenced_stable_id": "schema:auth", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:auth::grantee:supabase_auth_admin", "referenced_stable_id": "role:supabase_auth_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.uid()::grantee:dashboard_user", - "referenced_stable_id": "procedure:auth.uid()", + "dependent_stable_id": "acl:schema:auth::grantee:supabase_auth_admin", + "referenced_stable_id": "schema:auth", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.uid()::grantee:dashboard_user", + "dependent_stable_id": "acl:schema:auth::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:auth::grantee:supabase_realtime_admin", + "referenced_stable_id": "schema:auth", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:extensions::grantee:anon", + "referenced_stable_id": "role:anon", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:extensions::grantee:anon", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:extensions::grantee:authenticated", + "referenced_stable_id": "role:authenticated", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:extensions::grantee:authenticated", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:extensions::grantee:dashboard_user", "referenced_stable_id": "role:dashboard_user", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.uid()::grantee:PUBLIC", - "referenced_stable_id": "procedure:auth.uid()", + "dependent_stable_id": "acl:schema:extensions::grantee:dashboard_user", + "referenced_stable_id": "schema:extensions", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.uid()::grantee:PUBLIC", - "referenced_stable_id": "role:PUBLIC", + "dependent_stable_id": "acl:schema:extensions::grantee:postgres", + "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.uid()::grantee:supabase_auth_admin", - "referenced_stable_id": "procedure:auth.uid()", + "dependent_stable_id": "acl:schema:extensions::grantee:postgres", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:extensions::grantee:service_role", + "referenced_stable_id": "role:service_role", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:extensions::grantee:service_role", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:extensions::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:extensions::grantee:supabase_realtime_admin", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:graphql_public::grantee:anon", + "referenced_stable_id": "role:anon", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:graphql_public::grantee:anon", + "referenced_stable_id": "schema:graphql_public", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:graphql_public::grantee:authenticated", + "referenced_stable_id": "role:authenticated", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:graphql_public::grantee:authenticated", + "referenced_stable_id": "schema:graphql_public", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:graphql_public::grantee:postgres", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:graphql_public::grantee:postgres", + "referenced_stable_id": "schema:graphql_public", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:auth.uid()::grantee:supabase_auth_admin", - "referenced_stable_id": "role:supabase_auth_admin", + "dependent_stable_id": "acl:schema:graphql_public::grantee:service_role", + "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_cron_access()::grantee:dashboard_user", - "referenced_stable_id": "procedure:extensions.grant_pg_cron_access()", + "dependent_stable_id": "acl:schema:graphql_public::grantee:service_role", + "referenced_stable_id": "schema:graphql_public", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_cron_access()::grantee:dashboard_user", - "referenced_stable_id": "role:dashboard_user", + "dependent_stable_id": "acl:schema:graphql_public::grantee:supabase_admin", + "referenced_stable_id": "role:supabase_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_cron_access()::grantee:PUBLIC", - "referenced_stable_id": "procedure:extensions.grant_pg_cron_access()", + "dependent_stable_id": "acl:schema:graphql_public::grantee:supabase_admin", + "referenced_stable_id": "schema:graphql_public", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_cron_access()::grantee:PUBLIC", - "referenced_stable_id": "role:PUBLIC", + "dependent_stable_id": "acl:schema:graphql::grantee:anon", + "referenced_stable_id": "role:anon", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_cron_access()::grantee:supabase_admin", - "referenced_stable_id": "procedure:extensions.grant_pg_cron_access()", + "dependent_stable_id": "acl:schema:graphql::grantee:anon", + "referenced_stable_id": "schema:graphql", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_cron_access()::grantee:supabase_admin", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "acl:schema:graphql::grantee:authenticated", + "referenced_stable_id": "role:authenticated", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_graphql_access()::grantee:postgres", - "referenced_stable_id": "procedure:extensions.grant_pg_graphql_access()", + "dependent_stable_id": "acl:schema:graphql::grantee:authenticated", + "referenced_stable_id": "schema:graphql", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_graphql_access()::grantee:postgres", + "dependent_stable_id": "acl:schema:graphql::grantee:postgres", "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_graphql_access()::grantee:PUBLIC", - "referenced_stable_id": "procedure:extensions.grant_pg_graphql_access()", + "dependent_stable_id": "acl:schema:graphql::grantee:postgres", + "referenced_stable_id": "schema:graphql", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_graphql_access()::grantee:PUBLIC", - "referenced_stable_id": "role:PUBLIC", + "dependent_stable_id": "acl:schema:graphql::grantee:service_role", + "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_graphql_access()::grantee:supabase_admin", - "referenced_stable_id": "procedure:extensions.grant_pg_graphql_access()", + "dependent_stable_id": "acl:schema:graphql::grantee:service_role", + "referenced_stable_id": "schema:graphql", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_graphql_access()::grantee:supabase_admin", + "dependent_stable_id": "acl:schema:graphql::grantee:supabase_admin", "referenced_stable_id": "role:supabase_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_net_access()::grantee:dashboard_user", - "referenced_stable_id": "procedure:extensions.grant_pg_net_access()", + "dependent_stable_id": "acl:schema:graphql::grantee:supabase_admin", + "referenced_stable_id": "schema:graphql", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_net_access()::grantee:dashboard_user", - "referenced_stable_id": "role:dashboard_user", + "dependent_stable_id": "acl:schema:public::grantee:anon", + "referenced_stable_id": "role:anon", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_net_access()::grantee:PUBLIC", - "referenced_stable_id": "procedure:extensions.grant_pg_net_access()", + "dependent_stable_id": "acl:schema:public::grantee:anon", + "referenced_stable_id": "schema:public", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_net_access()::grantee:PUBLIC", - "referenced_stable_id": "role:PUBLIC", + "dependent_stable_id": "acl:schema:public::grantee:authenticated", + "referenced_stable_id": "role:authenticated", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_net_access()::grantee:supabase_admin", - "referenced_stable_id": "procedure:extensions.grant_pg_net_access()", + "dependent_stable_id": "acl:schema:public::grantee:authenticated", + "referenced_stable_id": "schema:public", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.grant_pg_net_access()::grantee:supabase_admin", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "acl:schema:public::grantee:pg_database_owner", + "referenced_stable_id": "role:pg_database_owner", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.pgrst_ddl_watch()::grantee:postgres", - "referenced_stable_id": "procedure:extensions.pgrst_ddl_watch()", + "dependent_stable_id": "acl:schema:public::grantee:pg_database_owner", + "referenced_stable_id": "schema:public", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.pgrst_ddl_watch()::grantee:postgres", + "dependent_stable_id": "acl:schema:public::grantee:postgres", "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.pgrst_ddl_watch()::grantee:PUBLIC", - "referenced_stable_id": "procedure:extensions.pgrst_ddl_watch()", + "dependent_stable_id": "acl:schema:public::grantee:postgres", + "referenced_stable_id": "schema:public", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.pgrst_ddl_watch()::grantee:PUBLIC", + "dependent_stable_id": "acl:schema:public::grantee:PUBLIC", "referenced_stable_id": "role:PUBLIC", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.pgrst_ddl_watch()::grantee:supabase_admin", - "referenced_stable_id": "procedure:extensions.pgrst_ddl_watch()", + "dependent_stable_id": "acl:schema:public::grantee:PUBLIC", + "referenced_stable_id": "schema:public", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.pgrst_ddl_watch()::grantee:supabase_admin", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "acl:schema:public::grantee:service_role", + "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.pgrst_drop_watch()::grantee:postgres", - "referenced_stable_id": "procedure:extensions.pgrst_drop_watch()", + "dependent_stable_id": "acl:schema:public::grantee:service_role", + "referenced_stable_id": "schema:public", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.pgrst_drop_watch()::grantee:postgres", - "referenced_stable_id": "role:postgres", + "dependent_stable_id": "acl:schema:public::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.pgrst_drop_watch()::grantee:PUBLIC", - "referenced_stable_id": "procedure:extensions.pgrst_drop_watch()", + "dependent_stable_id": "acl:schema:public::grantee:supabase_realtime_admin", + "referenced_stable_id": "schema:public", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.pgrst_drop_watch()::grantee:PUBLIC", - "referenced_stable_id": "role:PUBLIC", + "dependent_stable_id": "acl:schema:realtime::grantee:anon", + "referenced_stable_id": "role:anon", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.pgrst_drop_watch()::grantee:supabase_admin", - "referenced_stable_id": "procedure:extensions.pgrst_drop_watch()", + "dependent_stable_id": "acl:schema:realtime::grantee:anon", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.pgrst_drop_watch()::grantee:supabase_admin", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "acl:schema:realtime::grantee:authenticated", + "referenced_stable_id": "role:authenticated", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.set_graphql_placeholder()::grantee:postgres", - "referenced_stable_id": "procedure:extensions.set_graphql_placeholder()", + "dependent_stable_id": "acl:schema:realtime::grantee:authenticated", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.set_graphql_placeholder()::grantee:postgres", + "dependent_stable_id": "acl:schema:realtime::grantee:postgres", "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.set_graphql_placeholder()::grantee:PUBLIC", - "referenced_stable_id": "procedure:extensions.set_graphql_placeholder()", + "dependent_stable_id": "acl:schema:realtime::grantee:postgres", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.set_graphql_placeholder()::grantee:PUBLIC", - "referenced_stable_id": "role:PUBLIC", + "dependent_stable_id": "acl:schema:realtime::grantee:service_role", + "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.set_graphql_placeholder()::grantee:supabase_admin", - "referenced_stable_id": "procedure:extensions.set_graphql_placeholder()", + "dependent_stable_id": "acl:schema:realtime::grantee:service_role", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:extensions.set_graphql_placeholder()::grantee:supabase_admin", + "dependent_stable_id": "acl:schema:realtime::grantee:supabase_admin", "referenced_stable_id": "role:supabase_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:pgbouncer.get_auth(text)::grantee:pgbouncer", - "referenced_stable_id": "procedure:pgbouncer.get_auth(text)", - "deptype": "n" - }, - { - "dependent_stable_id": "acl:procedure:pgbouncer.get_auth(text)::grantee:pgbouncer", - "referenced_stable_id": "role:pgbouncer", + "dependent_stable_id": "acl:schema:realtime::grantee:supabase_admin", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:pgbouncer.get_auth(text)::grantee:supabase_admin", - "referenced_stable_id": "procedure:pgbouncer.get_auth(text)", + "dependent_stable_id": "acl:schema:realtime::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:procedure:pgbouncer.get_auth(text)::grantee:supabase_admin", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "acl:schema:realtime::grantee:supabase_realtime_admin", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:anon", + "dependent_stable_id": "acl:schema:storage::grantee:anon", "referenced_stable_id": "role:anon", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:anon", - "referenced_stable_id": "schema:auth", + "dependent_stable_id": "acl:schema:storage::grantee:anon", + "referenced_stable_id": "schema:storage", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:authenticated", + "dependent_stable_id": "acl:schema:storage::grantee:authenticated", "referenced_stable_id": "role:authenticated", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:authenticated", - "referenced_stable_id": "schema:auth", + "dependent_stable_id": "acl:schema:storage::grantee:authenticated", + "referenced_stable_id": "schema:storage", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:dashboard_user", + "dependent_stable_id": "acl:schema:storage::grantee:dashboard_user", "referenced_stable_id": "role:dashboard_user", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:dashboard_user", - "referenced_stable_id": "schema:auth", + "dependent_stable_id": "acl:schema:storage::grantee:dashboard_user", + "referenced_stable_id": "schema:storage", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:postgres", + "dependent_stable_id": "acl:schema:storage::grantee:postgres", "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:postgres", - "referenced_stable_id": "schema:auth", + "dependent_stable_id": "acl:schema:storage::grantee:postgres", + "referenced_stable_id": "schema:storage", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:service_role", + "dependent_stable_id": "acl:schema:storage::grantee:service_role", "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:service_role", - "referenced_stable_id": "schema:auth", + "dependent_stable_id": "acl:schema:storage::grantee:service_role", + "referenced_stable_id": "schema:storage", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:supabase_admin", + "dependent_stable_id": "acl:schema:storage::grantee:supabase_admin", "referenced_stable_id": "role:supabase_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:supabase_admin", - "referenced_stable_id": "schema:auth", + "dependent_stable_id": "acl:schema:storage::grantee:supabase_admin", + "referenced_stable_id": "schema:storage", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:supabase_auth_admin", - "referenced_stable_id": "role:supabase_auth_admin", + "dependent_stable_id": "acl:schema:storage::grantee:supabase_storage_admin", + "referenced_stable_id": "role:supabase_storage_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:auth::grantee:supabase_auth_admin", - "referenced_stable_id": "schema:auth", + "dependent_stable_id": "acl:schema:storage::grantee:supabase_storage_admin", + "referenced_stable_id": "schema:storage", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:extensions::grantee:anon", - "referenced_stable_id": "role:anon", + "dependent_stable_id": "acl:schema:vault::grantee:postgres", + "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:extensions::grantee:anon", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "acl:schema:vault::grantee:postgres", + "referenced_stable_id": "schema:vault", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:extensions::grantee:authenticated", - "referenced_stable_id": "role:authenticated", + "dependent_stable_id": "acl:schema:vault::grantee:service_role", + "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:extensions::grantee:authenticated", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "acl:schema:vault::grantee:service_role", + "referenced_stable_id": "schema:vault", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:extensions::grantee:dashboard_user", + "dependent_stable_id": "acl:schema:vault::grantee:supabase_admin", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:schema:vault::grantee:supabase_admin", + "referenced_stable_id": "schema:vault", + "deptype": "n" + }, + { + "dependent_stable_id": "acl:sequence:auth.refresh_tokens_id_seq::grantee:dashboard_user", "referenced_stable_id": "role:dashboard_user", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:extensions::grantee:dashboard_user", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "acl:sequence:auth.refresh_tokens_id_seq::grantee:dashboard_user", + "referenced_stable_id": "sequence:auth.refresh_tokens_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:extensions::grantee:postgres", + "dependent_stable_id": "acl:sequence:auth.refresh_tokens_id_seq::grantee:postgres", "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:extensions::grantee:postgres", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "acl:sequence:auth.refresh_tokens_id_seq::grantee:postgres", + "referenced_stable_id": "sequence:auth.refresh_tokens_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:extensions::grantee:service_role", - "referenced_stable_id": "role:service_role", + "dependent_stable_id": "acl:sequence:auth.refresh_tokens_id_seq::grantee:supabase_auth_admin", + "referenced_stable_id": "role:supabase_auth_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:extensions::grantee:service_role", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "acl:sequence:auth.refresh_tokens_id_seq::grantee:supabase_auth_admin", + "referenced_stable_id": "sequence:auth.refresh_tokens_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql_public::grantee:anon", + "dependent_stable_id": "acl:sequence:public.test_tenant_id_seq::grantee:anon", "referenced_stable_id": "role:anon", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql_public::grantee:anon", - "referenced_stable_id": "schema:graphql_public", + "dependent_stable_id": "acl:sequence:public.test_tenant_id_seq::grantee:anon", + "referenced_stable_id": "sequence:public.test_tenant_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql_public::grantee:authenticated", + "dependent_stable_id": "acl:sequence:public.test_tenant_id_seq::grantee:authenticated", "referenced_stable_id": "role:authenticated", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql_public::grantee:authenticated", - "referenced_stable_id": "schema:graphql_public", + "dependent_stable_id": "acl:sequence:public.test_tenant_id_seq::grantee:authenticated", + "referenced_stable_id": "sequence:public.test_tenant_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql_public::grantee:postgres", + "dependent_stable_id": "acl:sequence:public.test_tenant_id_seq::grantee:postgres", "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql_public::grantee:postgres", - "referenced_stable_id": "schema:graphql_public", + "dependent_stable_id": "acl:sequence:public.test_tenant_id_seq::grantee:postgres", + "referenced_stable_id": "sequence:public.test_tenant_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql_public::grantee:service_role", + "dependent_stable_id": "acl:sequence:public.test_tenant_id_seq::grantee:service_role", "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql_public::grantee:service_role", - "referenced_stable_id": "schema:graphql_public", + "dependent_stable_id": "acl:sequence:public.test_tenant_id_seq::grantee:service_role", + "referenced_stable_id": "sequence:public.test_tenant_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql_public::grantee:supabase_admin", + "dependent_stable_id": "acl:sequence:public.test_tenant_id_seq::grantee:supabase_admin", "referenced_stable_id": "role:supabase_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql_public::grantee:supabase_admin", - "referenced_stable_id": "schema:graphql_public", + "dependent_stable_id": "acl:sequence:public.test_tenant_id_seq::grantee:supabase_admin", + "referenced_stable_id": "sequence:public.test_tenant_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql::grantee:anon", + "dependent_stable_id": "acl:sequence:realtime.subscription_id_seq::grantee:anon", "referenced_stable_id": "role:anon", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql::grantee:anon", - "referenced_stable_id": "schema:graphql", + "dependent_stable_id": "acl:sequence:realtime.subscription_id_seq::grantee:anon", + "referenced_stable_id": "sequence:realtime.subscription_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql::grantee:authenticated", + "dependent_stable_id": "acl:sequence:realtime.subscription_id_seq::grantee:authenticated", "referenced_stable_id": "role:authenticated", "deptype": "n" }, - { - "dependent_stable_id": "acl:schema:graphql::grantee:authenticated", - "referenced_stable_id": "schema:graphql", + { + "dependent_stable_id": "acl:sequence:realtime.subscription_id_seq::grantee:authenticated", + "referenced_stable_id": "sequence:realtime.subscription_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql::grantee:postgres", + "dependent_stable_id": "acl:sequence:realtime.subscription_id_seq::grantee:postgres", "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql::grantee:postgres", - "referenced_stable_id": "schema:graphql", + "dependent_stable_id": "acl:sequence:realtime.subscription_id_seq::grantee:postgres", + "referenced_stable_id": "sequence:realtime.subscription_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql::grantee:service_role", + "dependent_stable_id": "acl:sequence:realtime.subscription_id_seq::grantee:service_role", "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql::grantee:service_role", - "referenced_stable_id": "schema:graphql", + "dependent_stable_id": "acl:sequence:realtime.subscription_id_seq::grantee:service_role", + "referenced_stable_id": "sequence:realtime.subscription_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql::grantee:supabase_admin", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "acl:sequence:realtime.subscription_id_seq::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:graphql::grantee:supabase_admin", - "referenced_stable_id": "schema:graphql", + "dependent_stable_id": "acl:sequence:realtime.subscription_id_seq::grantee:supabase_realtime_admin", + "referenced_stable_id": "sequence:realtime.subscription_id_seq", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:public::grantee:anon", - "referenced_stable_id": "role:anon", + "dependent_stable_id": "acl:table:auth.audit_log_entries::grantee:dashboard_user", + "referenced_stable_id": "role:dashboard_user", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:public::grantee:anon", - "referenced_stable_id": "schema:public", + "dependent_stable_id": "acl:table:auth.audit_log_entries::grantee:dashboard_user", + "referenced_stable_id": "table:auth.audit_log_entries", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:public::grantee:authenticated", - "referenced_stable_id": "role:authenticated", + "dependent_stable_id": "acl:table:auth.audit_log_entries::grantee:postgres", + "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:public::grantee:authenticated", - "referenced_stable_id": "schema:public", + "dependent_stable_id": "acl:table:auth.audit_log_entries::grantee:postgres", + "referenced_stable_id": "table:auth.audit_log_entries", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:public::grantee:pg_database_owner", - "referenced_stable_id": "role:pg_database_owner", + "dependent_stable_id": "acl:table:auth.audit_log_entries::grantee:supabase_auth_admin", + "referenced_stable_id": "role:supabase_auth_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:public::grantee:pg_database_owner", - "referenced_stable_id": "schema:public", + "dependent_stable_id": "acl:table:auth.audit_log_entries::grantee:supabase_auth_admin", + "referenced_stable_id": "table:auth.audit_log_entries", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:public::grantee:postgres", - "referenced_stable_id": "role:postgres", + "dependent_stable_id": "acl:table:auth.instances::grantee:dashboard_user", + "referenced_stable_id": "role:dashboard_user", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:public::grantee:postgres", - "referenced_stable_id": "schema:public", + "dependent_stable_id": "acl:table:auth.instances::grantee:dashboard_user", + "referenced_stable_id": "table:auth.instances", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:public::grantee:PUBLIC", - "referenced_stable_id": "role:PUBLIC", + "dependent_stable_id": "acl:table:auth.instances::grantee:postgres", + "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:public::grantee:PUBLIC", - "referenced_stable_id": "schema:public", + "dependent_stable_id": "acl:table:auth.instances::grantee:postgres", + "referenced_stable_id": "table:auth.instances", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:public::grantee:service_role", - "referenced_stable_id": "role:service_role", + "dependent_stable_id": "acl:table:auth.instances::grantee:supabase_auth_admin", + "referenced_stable_id": "role:supabase_auth_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:public::grantee:service_role", - "referenced_stable_id": "schema:public", + "dependent_stable_id": "acl:table:auth.instances::grantee:supabase_auth_admin", + "referenced_stable_id": "table:auth.instances", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:realtime::grantee:postgres", - "referenced_stable_id": "role:postgres", + "dependent_stable_id": "acl:table:auth.refresh_tokens::grantee:dashboard_user", + "referenced_stable_id": "role:dashboard_user", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:realtime::grantee:postgres", - "referenced_stable_id": "schema:realtime", + "dependent_stable_id": "acl:table:auth.refresh_tokens::grantee:dashboard_user", + "referenced_stable_id": "table:auth.refresh_tokens", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:realtime::grantee:supabase_admin", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "acl:table:auth.refresh_tokens::grantee:postgres", + "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:realtime::grantee:supabase_admin", - "referenced_stable_id": "schema:realtime", + "dependent_stable_id": "acl:table:auth.refresh_tokens::grantee:postgres", + "referenced_stable_id": "table:auth.refresh_tokens", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:anon", - "referenced_stable_id": "role:anon", + "dependent_stable_id": "acl:table:auth.refresh_tokens::grantee:supabase_auth_admin", + "referenced_stable_id": "role:supabase_auth_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:anon", - "referenced_stable_id": "schema:storage", + "dependent_stable_id": "acl:table:auth.refresh_tokens::grantee:supabase_auth_admin", + "referenced_stable_id": "table:auth.refresh_tokens", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:authenticated", - "referenced_stable_id": "role:authenticated", + "dependent_stable_id": "acl:table:auth.schema_migrations::grantee:supabase_auth_admin", + "referenced_stable_id": "role:supabase_auth_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:authenticated", - "referenced_stable_id": "schema:storage", + "dependent_stable_id": "acl:table:auth.schema_migrations::grantee:supabase_auth_admin", + "referenced_stable_id": "table:auth.schema_migrations", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:dashboard_user", + "dependent_stable_id": "acl:table:auth.users::grantee:dashboard_user", "referenced_stable_id": "role:dashboard_user", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:dashboard_user", - "referenced_stable_id": "schema:storage", + "dependent_stable_id": "acl:table:auth.users::grantee:dashboard_user", + "referenced_stable_id": "table:auth.users", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:postgres", + "dependent_stable_id": "acl:table:auth.users::grantee:postgres", "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:postgres", - "referenced_stable_id": "schema:storage", + "dependent_stable_id": "acl:table:auth.users::grantee:postgres", + "referenced_stable_id": "table:auth.users", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:service_role", - "referenced_stable_id": "role:service_role", + "dependent_stable_id": "acl:table:auth.users::grantee:supabase_auth_admin", + "referenced_stable_id": "role:supabase_auth_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:service_role", - "referenced_stable_id": "schema:storage", + "dependent_stable_id": "acl:table:auth.users::grantee:supabase_auth_admin", + "referenced_stable_id": "table:auth.users", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:supabase_admin", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "acl:table:public.test_tenant::grantee:anon", + "referenced_stable_id": "role:anon", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:supabase_admin", - "referenced_stable_id": "schema:storage", + "dependent_stable_id": "acl:table:public.test_tenant::grantee:anon", + "referenced_stable_id": "table:public.test_tenant", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:supabase_storage_admin", - "referenced_stable_id": "role:supabase_storage_admin", + "dependent_stable_id": "acl:table:public.test_tenant::grantee:authenticated", + "referenced_stable_id": "role:authenticated", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:storage::grantee:supabase_storage_admin", - "referenced_stable_id": "schema:storage", + "dependent_stable_id": "acl:table:public.test_tenant::grantee:authenticated", + "referenced_stable_id": "table:public.test_tenant", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:vault::grantee:postgres", + "dependent_stable_id": "acl:table:public.test_tenant::grantee:postgres", "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:vault::grantee:postgres", - "referenced_stable_id": "schema:vault", + "dependent_stable_id": "acl:table:public.test_tenant::grantee:postgres", + "referenced_stable_id": "table:public.test_tenant", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:vault::grantee:service_role", + "dependent_stable_id": "acl:table:public.test_tenant::grantee:service_role", "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:vault::grantee:service_role", - "referenced_stable_id": "schema:vault", + "dependent_stable_id": "acl:table:public.test_tenant::grantee:service_role", + "referenced_stable_id": "table:public.test_tenant", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:vault::grantee:supabase_admin", + "dependent_stable_id": "acl:table:public.test_tenant::grantee:supabase_admin", "referenced_stable_id": "role:supabase_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:schema:vault::grantee:supabase_admin", - "referenced_stable_id": "schema:vault", + "dependent_stable_id": "acl:table:public.test_tenant::grantee:supabase_admin", + "referenced_stable_id": "table:public.test_tenant", "deptype": "n" }, { - "dependent_stable_id": "acl:sequence:auth.refresh_tokens_id_seq::grantee:dashboard_user", - "referenced_stable_id": "role:dashboard_user", + "dependent_stable_id": "acl:table:public.test_tenant::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:sequence:auth.refresh_tokens_id_seq::grantee:dashboard_user", - "referenced_stable_id": "sequence:auth.refresh_tokens_id_seq", + "dependent_stable_id": "acl:table:public.test_tenant::grantee:supabase_realtime_admin", + "referenced_stable_id": "table:public.test_tenant", "deptype": "n" }, { - "dependent_stable_id": "acl:sequence:auth.refresh_tokens_id_seq::grantee:postgres", - "referenced_stable_id": "role:postgres", + "dependent_stable_id": "acl:table:realtime.messages::grantee:anon", + "referenced_stable_id": "role:anon", "deptype": "n" }, { - "dependent_stable_id": "acl:sequence:auth.refresh_tokens_id_seq::grantee:postgres", - "referenced_stable_id": "sequence:auth.refresh_tokens_id_seq", + "dependent_stable_id": "acl:table:realtime.messages::grantee:anon", + "referenced_stable_id": "table:realtime.messages", "deptype": "n" }, { - "dependent_stable_id": "acl:sequence:auth.refresh_tokens_id_seq::grantee:supabase_auth_admin", - "referenced_stable_id": "role:supabase_auth_admin", + "dependent_stable_id": "acl:table:realtime.messages::grantee:authenticated", + "referenced_stable_id": "role:authenticated", "deptype": "n" }, { - "dependent_stable_id": "acl:sequence:auth.refresh_tokens_id_seq::grantee:supabase_auth_admin", - "referenced_stable_id": "sequence:auth.refresh_tokens_id_seq", + "dependent_stable_id": "acl:table:realtime.messages::grantee:authenticated", + "referenced_stable_id": "table:realtime.messages", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.audit_log_entries::grantee:dashboard_user", - "referenced_stable_id": "role:dashboard_user", + "dependent_stable_id": "acl:table:realtime.messages::grantee:postgres", + "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.audit_log_entries::grantee:dashboard_user", - "referenced_stable_id": "table:auth.audit_log_entries", + "dependent_stable_id": "acl:table:realtime.messages::grantee:postgres", + "referenced_stable_id": "table:realtime.messages", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.audit_log_entries::grantee:postgres", - "referenced_stable_id": "role:postgres", + "dependent_stable_id": "acl:table:realtime.messages::grantee:service_role", + "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.audit_log_entries::grantee:postgres", - "referenced_stable_id": "table:auth.audit_log_entries", + "dependent_stable_id": "acl:table:realtime.messages::grantee:service_role", + "referenced_stable_id": "table:realtime.messages", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.audit_log_entries::grantee:supabase_auth_admin", - "referenced_stable_id": "role:supabase_auth_admin", + "dependent_stable_id": "acl:table:realtime.messages::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.audit_log_entries::grantee:supabase_auth_admin", - "referenced_stable_id": "table:auth.audit_log_entries", + "dependent_stable_id": "acl:table:realtime.messages::grantee:supabase_realtime_admin", + "referenced_stable_id": "table:realtime.messages", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.instances::grantee:dashboard_user", - "referenced_stable_id": "role:dashboard_user", + "dependent_stable_id": "acl:table:realtime.schema_migrations::grantee:anon", + "referenced_stable_id": "role:anon", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.instances::grantee:dashboard_user", - "referenced_stable_id": "table:auth.instances", + "dependent_stable_id": "acl:table:realtime.schema_migrations::grantee:anon", + "referenced_stable_id": "table:realtime.schema_migrations", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.instances::grantee:postgres", - "referenced_stable_id": "role:postgres", + "dependent_stable_id": "acl:table:realtime.schema_migrations::grantee:authenticated", + "referenced_stable_id": "role:authenticated", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.instances::grantee:postgres", - "referenced_stable_id": "table:auth.instances", + "dependent_stable_id": "acl:table:realtime.schema_migrations::grantee:authenticated", + "referenced_stable_id": "table:realtime.schema_migrations", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.instances::grantee:supabase_auth_admin", - "referenced_stable_id": "role:supabase_auth_admin", + "dependent_stable_id": "acl:table:realtime.schema_migrations::grantee:postgres", + "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.instances::grantee:supabase_auth_admin", - "referenced_stable_id": "table:auth.instances", + "dependent_stable_id": "acl:table:realtime.schema_migrations::grantee:postgres", + "referenced_stable_id": "table:realtime.schema_migrations", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.refresh_tokens::grantee:dashboard_user", - "referenced_stable_id": "role:dashboard_user", + "dependent_stable_id": "acl:table:realtime.schema_migrations::grantee:service_role", + "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.refresh_tokens::grantee:dashboard_user", - "referenced_stable_id": "table:auth.refresh_tokens", + "dependent_stable_id": "acl:table:realtime.schema_migrations::grantee:service_role", + "referenced_stable_id": "table:realtime.schema_migrations", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.refresh_tokens::grantee:postgres", - "referenced_stable_id": "role:postgres", + "dependent_stable_id": "acl:table:realtime.schema_migrations::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.refresh_tokens::grantee:postgres", - "referenced_stable_id": "table:auth.refresh_tokens", + "dependent_stable_id": "acl:table:realtime.schema_migrations::grantee:supabase_realtime_admin", + "referenced_stable_id": "table:realtime.schema_migrations", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.refresh_tokens::grantee:supabase_auth_admin", - "referenced_stable_id": "role:supabase_auth_admin", + "dependent_stable_id": "acl:table:realtime.subscription::grantee:anon", + "referenced_stable_id": "role:anon", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.refresh_tokens::grantee:supabase_auth_admin", - "referenced_stable_id": "table:auth.refresh_tokens", + "dependent_stable_id": "acl:table:realtime.subscription::grantee:anon", + "referenced_stable_id": "table:realtime.subscription", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.schema_migrations::grantee:supabase_auth_admin", - "referenced_stable_id": "role:supabase_auth_admin", + "dependent_stable_id": "acl:table:realtime.subscription::grantee:authenticated", + "referenced_stable_id": "role:authenticated", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.schema_migrations::grantee:supabase_auth_admin", - "referenced_stable_id": "table:auth.schema_migrations", + "dependent_stable_id": "acl:table:realtime.subscription::grantee:authenticated", + "referenced_stable_id": "table:realtime.subscription", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.users::grantee:dashboard_user", - "referenced_stable_id": "role:dashboard_user", + "dependent_stable_id": "acl:table:realtime.subscription::grantee:postgres", + "referenced_stable_id": "role:postgres", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.users::grantee:dashboard_user", - "referenced_stable_id": "table:auth.users", + "dependent_stable_id": "acl:table:realtime.subscription::grantee:postgres", + "referenced_stable_id": "table:realtime.subscription", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.users::grantee:postgres", - "referenced_stable_id": "role:postgres", + "dependent_stable_id": "acl:table:realtime.subscription::grantee:service_role", + "referenced_stable_id": "role:service_role", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.users::grantee:postgres", - "referenced_stable_id": "table:auth.users", + "dependent_stable_id": "acl:table:realtime.subscription::grantee:service_role", + "referenced_stable_id": "table:realtime.subscription", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.users::grantee:supabase_auth_admin", - "referenced_stable_id": "role:supabase_auth_admin", + "dependent_stable_id": "acl:table:realtime.subscription::grantee:supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "acl:table:auth.users::grantee:supabase_auth_admin", - "referenced_stable_id": "table:auth.users", + "dependent_stable_id": "acl:table:realtime.subscription::grantee:supabase_realtime_admin", + "referenced_stable_id": "table:realtime.subscription", "deptype": "n" }, { @@ -7959,6 +11999,31 @@ "referenced_stable_id": "sequence:auth.refresh_tokens_id_seq", "deptype": "n" }, + { + "dependent_stable_id": "column:public.test_tenant.id", + "referenced_stable_id": "sequence:public.test_tenant_id_seq", + "deptype": "n" + }, + { + "dependent_stable_id": "column:realtime.subscription.claims_role", + "referenced_stable_id": "column:realtime.subscription.claims", + "deptype": "n" + }, + { + "dependent_stable_id": "column:realtime.subscription.claims_role", + "referenced_stable_id": "procedure:realtime.to_regrole(text)", + "deptype": "n" + }, + { + "dependent_stable_id": "column:realtime.subscription.filters", + "referenced_stable_id": "type:realtime._user_defined_filter", + "deptype": "n" + }, + { + "dependent_stable_id": "column:realtime.user_defined_filter.op", + "referenced_stable_id": "type:realtime.equality_op", + "deptype": "n" + }, { "dependent_stable_id": "column:vault.secrets.nonce", "referenced_stable_id": "procedure:vault._crypto_aead_det_noncegen()", @@ -8050,38 +12115,73 @@ "deptype": "a" }, { - "dependent_stable_id": "comment:table:vault.secrets", - "referenced_stable_id": "table:vault.secrets", + "dependent_stable_id": "comment:table:vault.secrets", + "referenced_stable_id": "table:vault.secrets", + "deptype": "a" + }, + { + "dependent_stable_id": "constraint:auth.audit_log_entries.audit_log_entries_pkey", + "referenced_stable_id": "column:auth.audit_log_entries.id", + "deptype": "a" + }, + { + "dependent_stable_id": "constraint:auth.instances.instances_pkey", + "referenced_stable_id": "column:auth.instances.id", + "deptype": "a" + }, + { + "dependent_stable_id": "constraint:auth.refresh_tokens.refresh_tokens_pkey", + "referenced_stable_id": "column:auth.refresh_tokens.id", + "deptype": "a" + }, + { + "dependent_stable_id": "constraint:auth.schema_migrations.schema_migrations_pkey", + "referenced_stable_id": "column:auth.schema_migrations.version", + "deptype": "a" + }, + { + "dependent_stable_id": "constraint:auth.users.users_email_key", + "referenced_stable_id": "column:auth.users.email", + "deptype": "a" + }, + { + "dependent_stable_id": "constraint:auth.users.users_pkey", + "referenced_stable_id": "column:auth.users.id", + "deptype": "a" + }, + { + "dependent_stable_id": "constraint:public.test_tenant.test_tenant_pkey", + "referenced_stable_id": "column:public.test_tenant.id", "deptype": "a" }, { - "dependent_stable_id": "constraint:auth.audit_log_entries.audit_log_entries_pkey", - "referenced_stable_id": "column:auth.audit_log_entries.id", + "dependent_stable_id": "constraint:realtime.messages.messages_pkey", + "referenced_stable_id": "column:realtime.messages.id", "deptype": "a" }, { - "dependent_stable_id": "constraint:auth.instances.instances_pkey", - "referenced_stable_id": "column:auth.instances.id", + "dependent_stable_id": "constraint:realtime.messages.messages_pkey", + "referenced_stable_id": "column:realtime.messages.inserted_at", "deptype": "a" }, { - "dependent_stable_id": "constraint:auth.refresh_tokens.refresh_tokens_pkey", - "referenced_stable_id": "column:auth.refresh_tokens.id", + "dependent_stable_id": "constraint:realtime.schema_migrations.schema_migrations_pkey", + "referenced_stable_id": "column:realtime.schema_migrations.version", "deptype": "a" }, { - "dependent_stable_id": "constraint:auth.schema_migrations.schema_migrations_pkey", - "referenced_stable_id": "column:auth.schema_migrations.version", + "dependent_stable_id": "constraint:realtime.subscription.pk_subscription", + "referenced_stable_id": "column:realtime.subscription.id", "deptype": "a" }, { - "dependent_stable_id": "constraint:auth.users.users_email_key", - "referenced_stable_id": "column:auth.users.email", - "deptype": "a" + "dependent_stable_id": "constraint:realtime.subscription.subscription_action_filter_check", + "referenced_stable_id": "column:realtime.subscription.action_filter", + "deptype": "n" }, { - "dependent_stable_id": "constraint:auth.users.users_pkey", - "referenced_stable_id": "column:auth.users.id", + "dependent_stable_id": "constraint:realtime.subscription.subscription_action_filter_check", + "referenced_stable_id": "column:realtime.subscription.action_filter", "deptype": "a" }, { @@ -9579,6 +13679,81 @@ "referenced_stable_id": "table:auth.users", "deptype": "n" }, + { + "dependent_stable_id": "index:public.test_tenant.test_tenant_pkey", + "referenced_stable_id": "schema:public", + "deptype": "n" + }, + { + "dependent_stable_id": "index:public.test_tenant.test_tenant_pkey", + "referenced_stable_id": "table:public.test_tenant", + "deptype": "n" + }, + { + "dependent_stable_id": "index:realtime.schema_migrations.schema_migrations_pkey", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, + { + "dependent_stable_id": "index:realtime.schema_migrations.schema_migrations_pkey", + "referenced_stable_id": "table:realtime.schema_migrations", + "deptype": "n" + }, + { + "dependent_stable_id": "index:realtime.subscription.ix_realtime_subscription_entity", + "referenced_stable_id": "column:realtime.subscription.entity", + "deptype": "a" + }, + { + "dependent_stable_id": "index:realtime.subscription.ix_realtime_subscription_entity", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, + { + "dependent_stable_id": "index:realtime.subscription.ix_realtime_subscription_entity", + "referenced_stable_id": "table:realtime.subscription", + "deptype": "n" + }, + { + "dependent_stable_id": "index:realtime.subscription.pk_subscription", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, + { + "dependent_stable_id": "index:realtime.subscription.pk_subscription", + "referenced_stable_id": "table:realtime.subscription", + "deptype": "n" + }, + { + "dependent_stable_id": "index:realtime.subscription.subscription_subscription_id_entity_filters_action_filter_key", + "referenced_stable_id": "column:realtime.subscription.action_filter", + "deptype": "a" + }, + { + "dependent_stable_id": "index:realtime.subscription.subscription_subscription_id_entity_filters_action_filter_key", + "referenced_stable_id": "column:realtime.subscription.entity", + "deptype": "a" + }, + { + "dependent_stable_id": "index:realtime.subscription.subscription_subscription_id_entity_filters_action_filter_key", + "referenced_stable_id": "column:realtime.subscription.filters", + "deptype": "a" + }, + { + "dependent_stable_id": "index:realtime.subscription.subscription_subscription_id_entity_filters_action_filter_key", + "referenced_stable_id": "column:realtime.subscription.subscription_id", + "deptype": "a" + }, + { + "dependent_stable_id": "index:realtime.subscription.subscription_subscription_id_entity_filters_action_filter_key", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, + { + "dependent_stable_id": "index:realtime.subscription.subscription_subscription_id_entity_filters_action_filter_key", + "referenced_stable_id": "table:realtime.subscription", + "deptype": "n" + }, { "dependent_stable_id": "index:vault.secrets.secrets_name_idx", "referenced_stable_id": "column:vault.secrets.name", @@ -9644,6 +13819,16 @@ "referenced_stable_id": "role:postgres", "deptype": "n" }, + { + "dependent_stable_id": "membership:anon->supabase_realtime_admin", + "referenced_stable_id": "role:anon", + "deptype": "n" + }, + { + "dependent_stable_id": "membership:anon->supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, { "dependent_stable_id": "membership:authenticated->authenticator", "referenced_stable_id": "role:authenticated", @@ -9664,6 +13849,16 @@ "referenced_stable_id": "role:postgres", "deptype": "n" }, + { + "dependent_stable_id": "membership:authenticated->supabase_realtime_admin", + "referenced_stable_id": "role:authenticated", + "deptype": "n" + }, + { + "dependent_stable_id": "membership:authenticated->supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, { "dependent_stable_id": "membership:authenticator->postgres", "referenced_stable_id": "role:authenticator", @@ -9814,6 +14009,16 @@ "referenced_stable_id": "role:service_role", "deptype": "n" }, + { + "dependent_stable_id": "membership:service_role->supabase_realtime_admin", + "referenced_stable_id": "role:service_role", + "deptype": "n" + }, + { + "dependent_stable_id": "membership:service_role->supabase_realtime_admin", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, { "dependent_stable_id": "membership:supabase_superuser->postgres", "referenced_stable_id": "role:postgres", @@ -10345,203 +14550,378 @@ "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_generate_v1()", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:extensions.uuid_generate_v1()", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_generate_v1()", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_generate_v1mc()", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_generate_v1mc()", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_generate_v3(uuid,text)", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_generate_v3(uuid,text)", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_generate_v4()", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_generate_v4()", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_generate_v5(uuid,text)", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_generate_v5(uuid,text)", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_nil()", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_nil()", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_ns_dns()", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_ns_dns()", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_ns_oid()", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_ns_oid()", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_ns_url()", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_ns_url()", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_ns_x500()", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:extensions.uuid_ns_x500()", + "referenced_stable_id": "schema:extensions", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql_public.graphql(text,text,jsonb,jsonb)", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql_public.graphql(text,text,jsonb,jsonb)", + "referenced_stable_id": "schema:graphql_public", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql._internal_resolve(text,jsonb,text,jsonb)", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql._internal_resolve(text,jsonb,text,jsonb)", + "referenced_stable_id": "schema:graphql", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql.comment_directive(text)", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql.comment_directive(text)", + "referenced_stable_id": "schema:graphql", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql.exception(text)", + "referenced_stable_id": "language:plpgsql", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql.exception(text)", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql.exception(text)", + "referenced_stable_id": "schema:graphql", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql.get_schema_version()", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql.get_schema_version()", + "referenced_stable_id": "schema:graphql", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql.increment_schema_version()", + "referenced_stable_id": "language:plpgsql", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql.increment_schema_version()", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql.increment_schema_version()", + "referenced_stable_id": "schema:graphql", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:graphql.resolve(text,jsonb,text,jsonb)", + "referenced_stable_id": "language:plpgsql", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_generate_v1()", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "procedure:graphql.resolve(text,jsonb,text,jsonb)", + "referenced_stable_id": "role:supabase_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_generate_v1mc()", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:graphql.resolve(text,jsonb,text,jsonb)", + "referenced_stable_id": "schema:graphql", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_generate_v1mc()", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "procedure:pgbouncer.get_auth(text)", + "referenced_stable_id": "language:plpgsql", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_generate_v3(uuid,text)", + "dependent_stable_id": "procedure:pgbouncer.get_auth(text)", "referenced_stable_id": "role:supabase_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_generate_v3(uuid,text)", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "procedure:pgbouncer.get_auth(text)", + "referenced_stable_id": "schema:pgbouncer", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_generate_v4()", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.\"cast\"(text,regtype)", + "referenced_stable_id": "language:plpgsql", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_generate_v4()", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "procedure:realtime.\"cast\"(text,regtype)", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_generate_v5(uuid,text)", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.\"cast\"(text,regtype)", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_generate_v5(uuid,text)", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "procedure:realtime.apply_rls(jsonb,integer)", + "referenced_stable_id": "language:plpgsql", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_nil()", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.apply_rls(jsonb,integer)", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_nil()", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "procedure:realtime.apply_rls(jsonb,integer)", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_ns_dns()", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.apply_rls(jsonb,integer)", + "referenced_stable_id": "type:realtime.wal_rls", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_ns_dns()", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "procedure:realtime.broadcast_changes(text,text,text,text,text,record,record,text)", + "referenced_stable_id": "language:plpgsql", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_ns_oid()", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.broadcast_changes(text,text,text,text,text,record,record,text)", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_ns_oid()", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "procedure:realtime.broadcast_changes(text,text,text,text,text,record,record,text)", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_ns_url()", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_ns_url()", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_ns_x500()", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.build_prepared_statement_sql(text,regclass,realtime.wal_column[])", + "referenced_stable_id": "type:realtime._wal_column", "deptype": "n" }, { - "dependent_stable_id": "procedure:extensions.uuid_ns_x500()", - "referenced_stable_id": "schema:extensions", + "dependent_stable_id": "procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)", + "referenced_stable_id": "language:plpgsql", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql_public.graphql(text,text,jsonb,jsonb)", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql_public.graphql(text,text,jsonb,jsonb)", - "referenced_stable_id": "schema:graphql_public", + "dependent_stable_id": "procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql._internal_resolve(text,jsonb,text,jsonb)", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.check_equality_op(realtime.equality_op,regtype,text,text)", + "referenced_stable_id": "type:realtime.equality_op", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql._internal_resolve(text,jsonb,text,jsonb)", - "referenced_stable_id": "schema:graphql", + "dependent_stable_id": "procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.comment_directive(text)", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.comment_directive(text)", - "referenced_stable_id": "schema:graphql", + "dependent_stable_id": "procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])", + "referenced_stable_id": "type:realtime._user_defined_filter", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.exception(text)", - "referenced_stable_id": "language:plpgsql", + "dependent_stable_id": "procedure:realtime.is_visible_through_filters(realtime.wal_column[],realtime.user_defined_filter[])", + "referenced_stable_id": "type:realtime._wal_column", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.exception(text)", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.list_changes(name,name,integer,integer)", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.exception(text)", - "referenced_stable_id": "schema:graphql", + "dependent_stable_id": "procedure:realtime.list_changes(name,name,integer,integer)", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.get_schema_version()", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.quote_wal2json(regclass)", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.get_schema_version()", - "referenced_stable_id": "schema:graphql", + "dependent_stable_id": "procedure:realtime.quote_wal2json(regclass)", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.increment_schema_version()", + "dependent_stable_id": "procedure:realtime.send(jsonb,text,text,boolean)", "referenced_stable_id": "language:plpgsql", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.increment_schema_version()", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.send(jsonb,text,text,boolean)", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.increment_schema_version()", - "referenced_stable_id": "schema:graphql", + "dependent_stable_id": "procedure:realtime.send(jsonb,text,text,boolean)", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.resolve(text,jsonb,text,jsonb)", + "dependent_stable_id": "procedure:realtime.subscription_check_filters()", "referenced_stable_id": "language:plpgsql", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.resolve(text,jsonb,text,jsonb)", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.subscription_check_filters()", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:graphql.resolve(text,jsonb,text,jsonb)", - "referenced_stable_id": "schema:graphql", + "dependent_stable_id": "procedure:realtime.subscription_check_filters()", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "procedure:pgbouncer.get_auth(text)", - "referenced_stable_id": "language:plpgsql", + "dependent_stable_id": "procedure:realtime.to_regrole(text)", + "referenced_stable_id": "role:supabase_realtime_admin", "deptype": "n" }, { - "dependent_stable_id": "procedure:pgbouncer.get_auth(text)", - "referenced_stable_id": "role:supabase_admin", + "dependent_stable_id": "procedure:realtime.to_regrole(text)", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { - "dependent_stable_id": "procedure:pgbouncer.get_auth(text)", - "referenced_stable_id": "schema:pgbouncer", + "dependent_stable_id": "procedure:realtime.topic()", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "procedure:realtime.topic()", + "referenced_stable_id": "schema:realtime", "deptype": "n" }, { @@ -10606,7 +14986,17 @@ }, { "dependent_stable_id": "publication:supabase_realtime", - "referenced_stable_id": "role:postgres", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "publication:supabase_realtime", + "referenced_stable_id": "table:public.test_tenant", + "deptype": "a" + }, + { + "dependent_stable_id": "publication:supabase_realtime", + "referenced_stable_id": "table:public.test_tenant", "deptype": "n" }, { @@ -10664,6 +15054,11 @@ "referenced_stable_id": "procedure:vault._crypto_aead_det_decrypt(bytea,bytea,bigint,bytea,bytea)", "deptype": "n" }, + { + "dependent_stable_id": "schema:_realtime", + "referenced_stable_id": "role:postgres", + "deptype": "n" + }, { "dependent_stable_id": "schema:auth", "referenced_stable_id": "role:supabase_admin", @@ -10734,6 +15129,31 @@ "referenced_stable_id": "schema:graphql", "deptype": "n" }, + { + "dependent_stable_id": "sequence:public.test_tenant_id_seq", + "referenced_stable_id": "column:public.test_tenant.id", + "deptype": "a" + }, + { + "dependent_stable_id": "sequence:public.test_tenant_id_seq", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "sequence:public.test_tenant_id_seq", + "referenced_stable_id": "schema:public", + "deptype": "n" + }, + { + "dependent_stable_id": "sequence:realtime.subscription_id_seq", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "sequence:realtime.subscription_id_seq", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, { "dependent_stable_id": "table:auth.audit_log_entries", "referenced_stable_id": "role:supabase_auth_admin", @@ -10784,6 +15204,46 @@ "referenced_stable_id": "schema:auth", "deptype": "n" }, + { + "dependent_stable_id": "table:public.test_tenant", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "table:public.test_tenant", + "referenced_stable_id": "schema:public", + "deptype": "n" + }, + { + "dependent_stable_id": "table:realtime.messages", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "table:realtime.messages", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, + { + "dependent_stable_id": "table:realtime.schema_migrations", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "table:realtime.schema_migrations", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, + { + "dependent_stable_id": "table:realtime.subscription", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "table:realtime.subscription", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, { "dependent_stable_id": "table:vault.secrets", "referenced_stable_id": "role:supabase_admin", @@ -10794,6 +15254,21 @@ "referenced_stable_id": "schema:vault", "deptype": "n" }, + { + "dependent_stable_id": "trigger:realtime.subscription.tr_check_filters", + "referenced_stable_id": "procedure:realtime.subscription_check_filters()", + "deptype": "n" + }, + { + "dependent_stable_id": "trigger:realtime.subscription.tr_check_filters", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "trigger:realtime.subscription.tr_check_filters", + "referenced_stable_id": "table:realtime.subscription", + "deptype": "a" + }, { "dependent_stable_id": "type:auth._audit_log_entries", "referenced_stable_id": "role:supabase_auth_admin", @@ -10829,6 +15304,106 @@ "referenced_stable_id": "role:supabase_admin", "deptype": "n" }, + { + "dependent_stable_id": "type:public._test_tenant", + "referenced_stable_id": "role:supabase_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime._action", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime._equality_op", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime._messages", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime._schema_migrations", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime._subscription", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime._user_defined_filter", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime._wal_column", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime._wal_rls", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime.action", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime.action", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime.equality_op", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime.equality_op", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime.user_defined_filter", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime.user_defined_filter", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime.user_defined_filter", + "referenced_stable_id": "type:realtime.equality_op", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime.wal_column", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime.wal_column", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime.wal_rls", + "referenced_stable_id": "role:supabase_realtime_admin", + "deptype": "n" + }, + { + "dependent_stable_id": "type:realtime.wal_rls", + "referenced_stable_id": "schema:realtime", + "deptype": "n" + }, { "dependent_stable_id": "type:vault._decrypted_secrets", "referenced_stable_id": "role:supabase_admin", @@ -10839,6 +15414,26 @@ "referenced_stable_id": "role:supabase_admin", "deptype": "n" }, + { + "dependent_stable_id": "unknown:pg_class.16855", + "referenced_stable_id": "column:realtime.messages.extension", + "deptype": "a" + }, + { + "dependent_stable_id": "unknown:pg_class.16855", + "referenced_stable_id": "column:realtime.messages.inserted_at", + "deptype": "a" + }, + { + "dependent_stable_id": "unknown:pg_class.16855", + "referenced_stable_id": "column:realtime.messages.private", + "deptype": "a" + }, + { + "dependent_stable_id": "unknown:pg_class.16855", + "referenced_stable_id": "column:realtime.messages.topic", + "deptype": "a" + }, { "dependent_stable_id": "view:extensions.pg_stat_statements", "referenced_stable_id": "procedure:extensions.pg_stat_statements(boolean)",