github.com/Redstoneguy129/cli@v0.0.0-20230211220159-15dca4e91917/internal/utils/templates/initial_schemas/14.sql (about)

     1  --
     2  -- PostgreSQL database dump
     3  --
     4  
     5  -- Dumped from database version 14.5 (Debian 14.5-2.pgdg110+2)
     6  -- Dumped by pg_dump version 15.0
     7  
     8  SET statement_timeout = 0;
     9  SET lock_timeout = 0;
    10  SET idle_in_transaction_session_timeout = 0;
    11  SET client_encoding = 'UTF8';
    12  SET standard_conforming_strings = on;
    13  SELECT pg_catalog.set_config('search_path', '', false);
    14  SET check_function_bodies = false;
    15  SET xmloption = content;
    16  SET client_min_messages = warning;
    17  SET row_security = off;
    18  
    19  --
    20  -- Name: _realtime; Type: SCHEMA; Schema: -; Owner: postgres
    21  --
    22  
    23  CREATE SCHEMA IF NOT EXISTS _realtime;
    24  
    25  
    26  ALTER SCHEMA _realtime OWNER TO postgres;
    27  
    28  --
    29  -- Name: auth; Type: SCHEMA; Schema: -; Owner: supabase_admin
    30  --
    31  
    32  CREATE SCHEMA IF NOT EXISTS auth;
    33  
    34  
    35  ALTER SCHEMA auth OWNER TO supabase_admin;
    36  
    37  --
    38  -- Name: extensions; Type: SCHEMA; Schema: -; Owner: postgres
    39  --
    40  
    41  CREATE SCHEMA IF NOT EXISTS extensions;
    42  
    43  
    44  ALTER SCHEMA extensions OWNER TO postgres;
    45  
    46  --
    47  -- Name: graphql; Type: SCHEMA; Schema: -; Owner: supabase_admin
    48  --
    49  
    50  CREATE SCHEMA IF NOT EXISTS graphql;
    51  
    52  
    53  ALTER SCHEMA graphql OWNER TO supabase_admin;
    54  
    55  --
    56  -- Name: graphql_public; Type: SCHEMA; Schema: -; Owner: supabase_admin
    57  --
    58  
    59  CREATE SCHEMA IF NOT EXISTS graphql_public;
    60  
    61  
    62  ALTER SCHEMA graphql_public OWNER TO supabase_admin;
    63  
    64  --
    65  -- Name: pgbouncer; Type: SCHEMA; Schema: -; Owner: pgbouncer
    66  --
    67  
    68  CREATE SCHEMA IF NOT EXISTS pgbouncer;
    69  
    70  
    71  ALTER SCHEMA pgbouncer OWNER TO pgbouncer;
    72  
    73  --
    74  -- Name: pgsodium; Type: SCHEMA; Schema: -; Owner: postgres
    75  --
    76  
    77  CREATE SCHEMA IF NOT EXISTS pgsodium;
    78  
    79  
    80  ALTER SCHEMA pgsodium OWNER TO postgres;
    81  
    82  --
    83  -- Name: pgsodium; Type: EXTENSION; Schema: -; Owner: -
    84  --
    85  
    86  CREATE EXTENSION IF NOT EXISTS pgsodium WITH SCHEMA pgsodium;
    87  
    88  
    89  --
    90  -- Name: EXTENSION pgsodium; Type: COMMENT; Schema: -; Owner: 
    91  --
    92  
    93  COMMENT ON EXTENSION pgsodium IS 'Pgsodium is a modern cryptography library for Postgres.';
    94  
    95  
    96  --
    97  -- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
    98  --
    99  
   100  -- *not* creating schema, since initdb creates it
   101  
   102  
   103  ALTER SCHEMA public OWNER TO postgres;
   104  
   105  --
   106  -- Name: realtime; Type: SCHEMA; Schema: -; Owner: supabase_admin
   107  --
   108  
   109  CREATE SCHEMA IF NOT EXISTS realtime;
   110  
   111  
   112  ALTER SCHEMA realtime OWNER TO supabase_admin;
   113  
   114  --
   115  -- Name: storage; Type: SCHEMA; Schema: -; Owner: supabase_admin
   116  --
   117  
   118  CREATE SCHEMA IF NOT EXISTS storage;
   119  
   120  
   121  ALTER SCHEMA storage OWNER TO supabase_admin;
   122  
   123  --
   124  -- Name: pg_graphql; Type: EXTENSION; Schema: -; Owner: -
   125  --
   126  
   127  CREATE EXTENSION IF NOT EXISTS pg_graphql WITH SCHEMA graphql;
   128  
   129  
   130  --
   131  -- Name: EXTENSION pg_graphql; Type: COMMENT; Schema: -; Owner: 
   132  --
   133  
   134  COMMENT ON EXTENSION pg_graphql IS 'pg_graphql: GraphQL support';
   135  
   136  
   137  --
   138  -- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: -
   139  --
   140  
   141  CREATE EXTENSION IF NOT EXISTS pg_stat_statements WITH SCHEMA extensions;
   142  
   143  
   144  --
   145  -- Name: EXTENSION pg_stat_statements; Type: COMMENT; Schema: -; Owner: 
   146  --
   147  
   148  COMMENT ON EXTENSION pg_stat_statements IS 'track planning and execution statistics of all SQL statements executed';
   149  
   150  
   151  --
   152  -- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner: -
   153  --
   154  
   155  CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA extensions;
   156  
   157  
   158  --
   159  -- Name: EXTENSION pgcrypto; Type: COMMENT; Schema: -; Owner: 
   160  --
   161  
   162  COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions';
   163  
   164  
   165  --
   166  -- Name: pgjwt; Type: EXTENSION; Schema: -; Owner: -
   167  --
   168  
   169  CREATE EXTENSION IF NOT EXISTS pgjwt WITH SCHEMA extensions;
   170  
   171  
   172  --
   173  -- Name: EXTENSION pgjwt; Type: COMMENT; Schema: -; Owner: 
   174  --
   175  
   176  COMMENT ON EXTENSION pgjwt IS 'JSON Web Token API for Postgresql';
   177  
   178  
   179  --
   180  -- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: -
   181  --
   182  
   183  CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA extensions;
   184  
   185  
   186  --
   187  -- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner: 
   188  --
   189  
   190  COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)';
   191  
   192  
   193  --
   194  -- Name: aal_level; Type: TYPE; Schema: auth; Owner: supabase_auth_admin
   195  --
   196  
   197  CREATE TYPE auth.aal_level AS ENUM (
   198      'aal1',
   199      'aal2',
   200      'aal3'
   201  );
   202  
   203  
   204  ALTER TYPE auth.aal_level OWNER TO supabase_auth_admin;
   205  
   206  --
   207  -- Name: factor_status; Type: TYPE; Schema: auth; Owner: supabase_auth_admin
   208  --
   209  
   210  CREATE TYPE auth.factor_status AS ENUM (
   211      'unverified',
   212      'verified'
   213  );
   214  
   215  
   216  ALTER TYPE auth.factor_status OWNER TO supabase_auth_admin;
   217  
   218  --
   219  -- Name: factor_type; Type: TYPE; Schema: auth; Owner: supabase_auth_admin
   220  --
   221  
   222  CREATE TYPE auth.factor_type AS ENUM (
   223      'totp',
   224      'webauthn'
   225  );
   226  
   227  
   228  ALTER TYPE auth.factor_type OWNER TO supabase_auth_admin;
   229  
   230  --
   231  -- Name: email(); Type: FUNCTION; Schema: auth; Owner: supabase_auth_admin
   232  --
   233  
   234  CREATE OR REPLACE FUNCTION auth.email() RETURNS text
   235      LANGUAGE sql STABLE
   236      AS $$
   237    select 
   238    coalesce(
   239      nullif(current_setting('request.jwt.claim.email', true), ''),
   240      (nullif(current_setting('request.jwt.claims', true), '')::jsonb ->> 'email')
   241    )::text
   242  $$;
   243  
   244  
   245  ALTER FUNCTION auth.email() OWNER TO supabase_auth_admin;
   246  
   247  --
   248  -- Name: FUNCTION email(); Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
   249  --
   250  
   251  COMMENT ON FUNCTION auth.email() IS 'Deprecated. Use auth.jwt() -> ''email'' instead.';
   252  
   253  
   254  --
   255  -- Name: jwt(); Type: FUNCTION; Schema: auth; Owner: supabase_auth_admin
   256  --
   257  
   258  CREATE OR REPLACE FUNCTION auth.jwt() RETURNS jsonb
   259      LANGUAGE sql STABLE
   260      AS $$
   261    select 
   262      coalesce(
   263          nullif(current_setting('request.jwt.claim', true), ''),
   264          nullif(current_setting('request.jwt.claims', true), '')
   265      )::jsonb
   266  $$;
   267  
   268  
   269  ALTER FUNCTION auth.jwt() OWNER TO supabase_auth_admin;
   270  
   271  --
   272  -- Name: role(); Type: FUNCTION; Schema: auth; Owner: supabase_auth_admin
   273  --
   274  
   275  CREATE OR REPLACE FUNCTION auth.role() RETURNS text
   276      LANGUAGE sql STABLE
   277      AS $$
   278    select 
   279    coalesce(
   280      nullif(current_setting('request.jwt.claim.role', true), ''),
   281      (nullif(current_setting('request.jwt.claims', true), '')::jsonb ->> 'role')
   282    )::text
   283  $$;
   284  
   285  
   286  ALTER FUNCTION auth.role() OWNER TO supabase_auth_admin;
   287  
   288  --
   289  -- Name: FUNCTION role(); Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
   290  --
   291  
   292  COMMENT ON FUNCTION auth.role() IS 'Deprecated. Use auth.jwt() -> ''role'' instead.';
   293  
   294  
   295  --
   296  -- Name: uid(); Type: FUNCTION; Schema: auth; Owner: supabase_auth_admin
   297  --
   298  
   299  CREATE OR REPLACE FUNCTION auth.uid() RETURNS uuid
   300      LANGUAGE sql STABLE
   301      AS $$
   302    select 
   303    coalesce(
   304      nullif(current_setting('request.jwt.claim.sub', true), ''),
   305      (nullif(current_setting('request.jwt.claims', true), '')::jsonb ->> 'sub')
   306    )::uuid
   307  $$;
   308  
   309  
   310  ALTER FUNCTION auth.uid() OWNER TO supabase_auth_admin;
   311  
   312  --
   313  -- Name: FUNCTION uid(); Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
   314  --
   315  
   316  COMMENT ON FUNCTION auth.uid() IS 'Deprecated. Use auth.jwt() -> ''sub'' instead.';
   317  
   318  
   319  --
   320  -- Name: grant_pg_cron_access(); Type: FUNCTION; Schema: extensions; Owner: postgres
   321  --
   322  
   323  CREATE OR REPLACE FUNCTION extensions.grant_pg_cron_access() RETURNS event_trigger
   324      LANGUAGE plpgsql
   325      AS $$
   326  DECLARE
   327    schema_is_cron bool;
   328  BEGIN
   329    schema_is_cron = (
   330      SELECT n.nspname = 'cron'
   331      FROM pg_event_trigger_ddl_commands() AS ev
   332      LEFT JOIN pg_catalog.pg_namespace AS n
   333        ON ev.objid = n.oid
   334    );
   335  
   336    IF schema_is_cron
   337    THEN
   338      grant usage on schema cron to postgres with grant option;
   339  
   340      alter default privileges in schema cron grant all on tables to postgres with grant option;
   341      alter default privileges in schema cron grant all on functions to postgres with grant option;
   342      alter default privileges in schema cron grant all on sequences to postgres with grant option;
   343  
   344      alter default privileges for user supabase_admin in schema cron grant all
   345          on sequences to postgres with grant option;
   346      alter default privileges for user supabase_admin in schema cron grant all
   347          on tables to postgres with grant option;
   348      alter default privileges for user supabase_admin in schema cron grant all
   349          on functions to postgres with grant option;
   350  
   351      grant all privileges on all tables in schema cron to postgres with grant option;
   352  
   353    END IF;
   354  
   355  END;
   356  $$;
   357  
   358  
   359  ALTER FUNCTION extensions.grant_pg_cron_access() OWNER TO postgres;
   360  
   361  --
   362  -- Name: FUNCTION grant_pg_cron_access(); Type: COMMENT; Schema: extensions; Owner: postgres
   363  --
   364  
   365  COMMENT ON FUNCTION extensions.grant_pg_cron_access() IS 'Grants access to pg_cron';
   366  
   367  
   368  --
   369  -- Name: grant_pg_graphql_access(); Type: FUNCTION; Schema: extensions; Owner: supabase_admin
   370  --
   371  
   372  CREATE OR REPLACE FUNCTION extensions.grant_pg_graphql_access() RETURNS event_trigger
   373      LANGUAGE plpgsql
   374      AS $_$
   375  DECLARE
   376      func_is_graphql_resolve bool;
   377  BEGIN
   378      func_is_graphql_resolve = (
   379          SELECT n.proname = 'resolve'
   380          FROM pg_event_trigger_ddl_commands() AS ev
   381          LEFT JOIN pg_catalog.pg_proc AS n
   382          ON ev.objid = n.oid
   383      );
   384  
   385      IF func_is_graphql_resolve
   386      THEN
   387          -- Update public wrapper to pass all arguments through to the pg_graphql resolve func
   388          DROP FUNCTION IF EXISTS graphql_public.graphql;
   389          create or replace function graphql_public.graphql(
   390              "operationName" text default null,
   391              query text default null,
   392              variables jsonb default null,
   393              extensions jsonb default null
   394          )
   395              returns jsonb
   396              language sql
   397          as $$
   398              select graphql.resolve(
   399                  query := query,
   400                  variables := coalesce(variables, '{}'),
   401                  "operationName" := "operationName",
   402                  extensions := extensions
   403              );
   404          $$;
   405  
   406          -- This hook executes when `graphql.resolve` is created. That is not necessarily the last
   407          -- function in the extension so we need to grant permissions on existing entities AND
   408          -- update default permissions to any others that are created after `graphql.resolve`
   409          grant usage on schema graphql to postgres, anon, authenticated, service_role;
   410          grant select on all tables in schema graphql to postgres, anon, authenticated, service_role;
   411          grant execute on all functions in schema graphql to postgres, anon, authenticated, service_role;
   412          grant all on all sequences in schema graphql to postgres, anon, authenticated, service_role;
   413          alter default privileges in schema graphql grant all on tables to postgres, anon, authenticated, service_role;
   414          alter default privileges in schema graphql grant all on functions to postgres, anon, authenticated, service_role;
   415          alter default privileges in schema graphql grant all on sequences to postgres, anon, authenticated, service_role;
   416      END IF;
   417  
   418  END;
   419  $_$;
   420  
   421  
   422  ALTER FUNCTION extensions.grant_pg_graphql_access() OWNER TO supabase_admin;
   423  
   424  --
   425  -- Name: FUNCTION grant_pg_graphql_access(); Type: COMMENT; Schema: extensions; Owner: supabase_admin
   426  --
   427  
   428  COMMENT ON FUNCTION extensions.grant_pg_graphql_access() IS 'Grants access to pg_graphql';
   429  
   430  
   431  --
   432  -- Name: grant_pg_net_access(); Type: FUNCTION; Schema: extensions; Owner: postgres
   433  --
   434  
   435  CREATE OR REPLACE FUNCTION extensions.grant_pg_net_access() RETURNS event_trigger
   436      LANGUAGE plpgsql
   437      AS $$
   438  BEGIN
   439    IF EXISTS (
   440      SELECT 1
   441      FROM pg_event_trigger_ddl_commands() AS ev
   442      JOIN pg_extension AS ext
   443      ON ev.objid = ext.oid
   444      WHERE ext.extname = 'pg_net'
   445    )
   446    THEN
   447      IF NOT EXISTS (
   448        SELECT 1
   449        FROM pg_roles
   450        WHERE rolname = 'supabase_functions_admin'
   451      )
   452      THEN
   453        CREATE USER supabase_functions_admin NOINHERIT CREATEROLE LOGIN NOREPLICATION;
   454      END IF;
   455  
   456      GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role;
   457  
   458      ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER;
   459      ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER;
   460      ALTER function net.http_collect_response(request_id bigint, async boolean) SECURITY DEFINER;
   461  
   462      ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net;
   463      ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net;
   464      ALTER function net.http_collect_response(request_id bigint, async boolean) SET search_path = net;
   465  
   466      REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC;
   467      REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC;
   468      REVOKE ALL ON FUNCTION net.http_collect_response(request_id bigint, async boolean) FROM PUBLIC;
   469  
   470      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;
   471      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;
   472      GRANT EXECUTE ON FUNCTION net.http_collect_response(request_id bigint, async boolean) TO supabase_functions_admin, postgres, anon, authenticated, service_role;
   473    END IF;
   474  END;
   475  $$;
   476  
   477  
   478  ALTER FUNCTION extensions.grant_pg_net_access() OWNER TO postgres;
   479  
   480  --
   481  -- Name: FUNCTION grant_pg_net_access(); Type: COMMENT; Schema: extensions; Owner: postgres
   482  --
   483  
   484  COMMENT ON FUNCTION extensions.grant_pg_net_access() IS 'Grants access to pg_net';
   485  
   486  
   487  --
   488  -- Name: pgrst_ddl_watch(); Type: FUNCTION; Schema: extensions; Owner: supabase_admin
   489  --
   490  
   491  CREATE OR REPLACE FUNCTION extensions.pgrst_ddl_watch() RETURNS event_trigger
   492      LANGUAGE plpgsql
   493      AS $$
   494  DECLARE
   495    cmd record;
   496  BEGIN
   497    FOR cmd IN SELECT * FROM pg_event_trigger_ddl_commands()
   498    LOOP
   499      IF cmd.command_tag IN (
   500        'CREATE SCHEMA', 'ALTER SCHEMA'
   501      , 'CREATE TABLE', 'CREATE TABLE AS', 'SELECT INTO', 'ALTER TABLE'
   502      , 'CREATE FOREIGN TABLE', 'ALTER FOREIGN TABLE'
   503      , 'CREATE VIEW', 'ALTER VIEW'
   504      , 'CREATE MATERIALIZED VIEW', 'ALTER MATERIALIZED VIEW'
   505      , 'CREATE FUNCTION', 'ALTER FUNCTION'
   506      , 'CREATE TRIGGER'
   507      , 'CREATE TYPE', 'ALTER TYPE'
   508      , 'CREATE RULE'
   509      , 'COMMENT'
   510      )
   511      -- don't notify in case of CREATE TEMP table or other objects created on pg_temp
   512      AND cmd.schema_name is distinct from 'pg_temp'
   513      THEN
   514        NOTIFY pgrst, 'reload schema';
   515      END IF;
   516    END LOOP;
   517  END; $$;
   518  
   519  
   520  ALTER FUNCTION extensions.pgrst_ddl_watch() OWNER TO supabase_admin;
   521  
   522  --
   523  -- Name: pgrst_drop_watch(); Type: FUNCTION; Schema: extensions; Owner: supabase_admin
   524  --
   525  
   526  CREATE OR REPLACE FUNCTION extensions.pgrst_drop_watch() RETURNS event_trigger
   527      LANGUAGE plpgsql
   528      AS $$
   529  DECLARE
   530    obj record;
   531  BEGIN
   532    FOR obj IN SELECT * FROM pg_event_trigger_dropped_objects()
   533    LOOP
   534      IF obj.object_type IN (
   535        'schema'
   536      , 'table'
   537      , 'foreign table'
   538      , 'view'
   539      , 'materialized view'
   540      , 'function'
   541      , 'trigger'
   542      , 'type'
   543      , 'rule'
   544      )
   545      AND obj.is_temporary IS false -- no pg_temp objects
   546      THEN
   547        NOTIFY pgrst, 'reload schema';
   548      END IF;
   549    END LOOP;
   550  END; $$;
   551  
   552  
   553  ALTER FUNCTION extensions.pgrst_drop_watch() OWNER TO supabase_admin;
   554  
   555  --
   556  -- Name: set_graphql_placeholder(); Type: FUNCTION; Schema: extensions; Owner: supabase_admin
   557  --
   558  
   559  CREATE OR REPLACE FUNCTION extensions.set_graphql_placeholder() RETURNS event_trigger
   560      LANGUAGE plpgsql
   561      AS $_$
   562      DECLARE
   563      graphql_is_dropped bool;
   564      BEGIN
   565      graphql_is_dropped = (
   566          SELECT ev.schema_name = 'graphql_public'
   567          FROM pg_event_trigger_dropped_objects() AS ev
   568          WHERE ev.schema_name = 'graphql_public'
   569      );
   570  
   571      IF graphql_is_dropped
   572      THEN
   573          create or replace function graphql_public.graphql(
   574              "operationName" text default null,
   575              query text default null,
   576              variables jsonb default null,
   577              extensions jsonb default null
   578          )
   579              returns jsonb
   580              language plpgsql
   581          as $$
   582              DECLARE
   583                  server_version float;
   584              BEGIN
   585                  server_version = (SELECT (SPLIT_PART((select version()), ' ', 2))::float);
   586  
   587                  IF server_version >= 14 THEN
   588                      RETURN jsonb_build_object(
   589                          'errors', jsonb_build_array(
   590                              jsonb_build_object(
   591                                  'message', 'pg_graphql extension is not enabled.'
   592                              )
   593                          )
   594                      );
   595                  ELSE
   596                      RETURN jsonb_build_object(
   597                          'errors', jsonb_build_array(
   598                              jsonb_build_object(
   599                                  'message', 'pg_graphql is only available on projects running Postgres 14 onwards.'
   600                              )
   601                          )
   602                      );
   603                  END IF;
   604              END;
   605          $$;
   606      END IF;
   607  
   608      END;
   609  $_$;
   610  
   611  
   612  ALTER FUNCTION extensions.set_graphql_placeholder() OWNER TO supabase_admin;
   613  
   614  --
   615  -- Name: FUNCTION set_graphql_placeholder(); Type: COMMENT; Schema: extensions; Owner: supabase_admin
   616  --
   617  
   618  COMMENT ON FUNCTION extensions.set_graphql_placeholder() IS 'Reintroduces placeholder function for graphql_public.graphql';
   619  
   620  
   621  --
   622  -- Name: get_auth(text); Type: FUNCTION; Schema: pgbouncer; Owner: postgres
   623  --
   624  
   625  CREATE OR REPLACE FUNCTION pgbouncer.get_auth(p_usename text) RETURNS TABLE(username text, password text)
   626      LANGUAGE plpgsql SECURITY DEFINER
   627      AS $$
   628  BEGIN
   629      RAISE WARNING 'PgBouncer auth request: %', p_usename;
   630  
   631      RETURN QUERY
   632      SELECT usename::TEXT, passwd::TEXT FROM pg_catalog.pg_shadow
   633      WHERE usename = p_usename;
   634  END;
   635  $$;
   636  
   637  
   638  ALTER FUNCTION pgbouncer.get_auth(p_usename text) OWNER TO postgres;
   639  
   640  --
   641  -- Name: extension(text); Type: FUNCTION; Schema: storage; Owner: supabase_storage_admin
   642  --
   643  
   644  CREATE OR REPLACE FUNCTION storage.extension(name text) RETURNS text
   645      LANGUAGE plpgsql
   646      AS $$
   647  DECLARE
   648  _parts text[];
   649  _filename text;
   650  BEGIN
   651  	select string_to_array(name, '/') into _parts;
   652  	select _parts[array_length(_parts,1)] into _filename;
   653  	-- @todo return the last part instead of 2
   654  	return split_part(_filename, '.', 2);
   655  END
   656  $$;
   657  
   658  
   659  ALTER FUNCTION storage.extension(name text) OWNER TO supabase_storage_admin;
   660  
   661  --
   662  -- Name: filename(text); Type: FUNCTION; Schema: storage; Owner: supabase_storage_admin
   663  --
   664  
   665  CREATE OR REPLACE FUNCTION storage.filename(name text) RETURNS text
   666      LANGUAGE plpgsql
   667      AS $$
   668  DECLARE
   669  _parts text[];
   670  BEGIN
   671  	select string_to_array(name, '/') into _parts;
   672  	return _parts[array_length(_parts,1)];
   673  END
   674  $$;
   675  
   676  
   677  ALTER FUNCTION storage.filename(name text) OWNER TO supabase_storage_admin;
   678  
   679  --
   680  -- Name: foldername(text); Type: FUNCTION; Schema: storage; Owner: supabase_storage_admin
   681  --
   682  
   683  CREATE OR REPLACE FUNCTION storage.foldername(name text) RETURNS text[]
   684      LANGUAGE plpgsql
   685      AS $$
   686  DECLARE
   687  _parts text[];
   688  BEGIN
   689  	select string_to_array(name, '/') into _parts;
   690  	return _parts[1:array_length(_parts,1)-1];
   691  END
   692  $$;
   693  
   694  
   695  ALTER FUNCTION storage.foldername(name text) OWNER TO supabase_storage_admin;
   696  
   697  --
   698  -- Name: get_size_by_bucket(); Type: FUNCTION; Schema: storage; Owner: supabase_storage_admin
   699  --
   700  
   701  CREATE OR REPLACE FUNCTION storage.get_size_by_bucket() RETURNS TABLE(size bigint, bucket_id text)
   702      LANGUAGE plpgsql
   703      AS $$
   704  BEGIN
   705      return query
   706          select sum((metadata->>'size')::int) as size, obj.bucket_id
   707          from "storage".objects as obj
   708          group by obj.bucket_id;
   709  END
   710  $$;
   711  
   712  
   713  ALTER FUNCTION storage.get_size_by_bucket() OWNER TO supabase_storage_admin;
   714  
   715  --
   716  -- Name: search(text, text, integer, integer, integer, text, text, text); Type: FUNCTION; Schema: storage; Owner: supabase_storage_admin
   717  --
   718  
   719  CREATE OR REPLACE FUNCTION storage.search(prefix text, bucketname text, limits integer DEFAULT 100, levels integer DEFAULT 1, offsets integer DEFAULT 0, search text DEFAULT ''::text, sortcolumn text DEFAULT 'name'::text, sortorder text DEFAULT 'asc'::text) RETURNS TABLE(name text, id uuid, updated_at timestamp with time zone, created_at timestamp with time zone, last_accessed_at timestamp with time zone, metadata jsonb)
   720      LANGUAGE plpgsql STABLE
   721      AS $_$
   722  declare
   723    v_order_by text;
   724    v_sort_order text;
   725  begin
   726    case
   727      when sortcolumn = 'name' then
   728        v_order_by = 'name';
   729      when sortcolumn = 'updated_at' then
   730        v_order_by = 'updated_at';
   731      when sortcolumn = 'created_at' then
   732        v_order_by = 'created_at';
   733      when sortcolumn = 'last_accessed_at' then
   734        v_order_by = 'last_accessed_at';
   735      else
   736        v_order_by = 'name';
   737    end case;
   738  
   739    case
   740      when sortorder = 'asc' then
   741        v_sort_order = 'asc';
   742      when sortorder = 'desc' then
   743        v_sort_order = 'desc';
   744      else
   745        v_sort_order = 'asc';
   746    end case;
   747  
   748    v_order_by = v_order_by || ' ' || v_sort_order;
   749  
   750    return query execute
   751      'with folders as (
   752         select path_tokens[$1] as folder
   753         from storage.objects
   754           where objects.name ilike $2 || $3 || ''%''
   755             and bucket_id = $4
   756             and array_length(regexp_split_to_array(objects.name, ''/''), 1) <> $1
   757         group by folder
   758         order by folder ' || v_sort_order || '
   759       )
   760       (select folder as "name",
   761              null as id,
   762              null as updated_at,
   763              null as created_at,
   764              null as last_accessed_at,
   765              null as metadata from folders)
   766       union all
   767       (select path_tokens[$1] as "name",
   768              id,
   769              updated_at,
   770              created_at,
   771              last_accessed_at,
   772              metadata
   773       from storage.objects
   774       where objects.name ilike $2 || $3 || ''%''
   775         and bucket_id = $4
   776         and array_length(regexp_split_to_array(objects.name, ''/''), 1) = $1
   777       order by ' || v_order_by || ')
   778       limit $5
   779       offset $6' using levels, prefix, search, bucketname, limits, offsets;
   780  end;
   781  $_$;
   782  
   783  
   784  ALTER FUNCTION storage.search(prefix text, bucketname text, limits integer, levels integer, offsets integer, search text, sortcolumn text, sortorder text) OWNER TO supabase_storage_admin;
   785  
   786  --
   787  -- Name: update_updated_at_column(); Type: FUNCTION; Schema: storage; Owner: supabase_storage_admin
   788  --
   789  
   790  CREATE OR REPLACE FUNCTION storage.update_updated_at_column() RETURNS trigger
   791      LANGUAGE plpgsql
   792      AS $$
   793  BEGIN
   794      NEW.updated_at = now();
   795      RETURN NEW; 
   796  END;
   797  $$;
   798  
   799  
   800  ALTER FUNCTION storage.update_updated_at_column() OWNER TO supabase_storage_admin;
   801  
   802  SET default_tablespace = '';
   803  
   804  SET default_table_access_method = heap;
   805  
   806  --
   807  -- Name: extensions; Type: TABLE; Schema: _realtime; Owner: postgres
   808  --
   809  
   810  CREATE TABLE IF NOT EXISTS _realtime.extensions (
   811      id uuid NOT NULL,
   812      type character varying(255),
   813      settings jsonb,
   814      tenant_external_id character varying(255),
   815      inserted_at timestamp(0) without time zone NOT NULL,
   816      updated_at timestamp(0) without time zone NOT NULL
   817  );
   818  
   819  
   820  ALTER TABLE _realtime.extensions OWNER TO postgres;
   821  
   822  --
   823  -- Name: schema_migrations; Type: TABLE; Schema: _realtime; Owner: postgres
   824  --
   825  
   826  CREATE TABLE IF NOT EXISTS _realtime.schema_migrations (
   827      version bigint NOT NULL,
   828      inserted_at timestamp(0) without time zone
   829  );
   830  
   831  
   832  ALTER TABLE _realtime.schema_migrations OWNER TO postgres;
   833  
   834  --
   835  -- Name: tenants; Type: TABLE; Schema: _realtime; Owner: postgres
   836  --
   837  
   838  CREATE TABLE IF NOT EXISTS _realtime.tenants (
   839      id uuid NOT NULL,
   840      name character varying(255),
   841      external_id character varying(255),
   842      jwt_secret character varying(500),
   843      max_concurrent_users integer DEFAULT 200 NOT NULL,
   844      inserted_at timestamp(0) without time zone NOT NULL,
   845      updated_at timestamp(0) without time zone NOT NULL,
   846      max_events_per_second integer DEFAULT 100 NOT NULL,
   847      postgres_cdc_default character varying(255) DEFAULT 'postgres_cdc_rls'::character varying
   848  );
   849  
   850  
   851  ALTER TABLE _realtime.tenants OWNER TO postgres;
   852  
   853  --
   854  -- Name: audit_log_entries; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
   855  --
   856  
   857  CREATE TABLE IF NOT EXISTS auth.audit_log_entries (
   858      instance_id uuid,
   859      id uuid NOT NULL,
   860      payload json,
   861      created_at timestamp with time zone,
   862      ip_address character varying(64) DEFAULT ''::character varying NOT NULL
   863  );
   864  
   865  
   866  ALTER TABLE auth.audit_log_entries OWNER TO supabase_auth_admin;
   867  
   868  --
   869  -- Name: TABLE audit_log_entries; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
   870  --
   871  
   872  COMMENT ON TABLE auth.audit_log_entries IS 'Auth: Audit trail for user actions.';
   873  
   874  
   875  --
   876  -- Name: identities; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
   877  --
   878  
   879  CREATE TABLE IF NOT EXISTS auth.identities (
   880      id text NOT NULL,
   881      user_id uuid NOT NULL,
   882      identity_data jsonb NOT NULL,
   883      provider text NOT NULL,
   884      last_sign_in_at timestamp with time zone,
   885      created_at timestamp with time zone,
   886      updated_at timestamp with time zone,
   887      email text GENERATED ALWAYS AS (lower((identity_data ->> 'email'::text))) STORED
   888  );
   889  
   890  
   891  ALTER TABLE auth.identities OWNER TO supabase_auth_admin;
   892  
   893  --
   894  -- Name: TABLE identities; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
   895  --
   896  
   897  COMMENT ON TABLE auth.identities IS 'Auth: Stores identities associated to a user.';
   898  
   899  
   900  --
   901  -- Name: COLUMN identities.email; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
   902  --
   903  
   904  COMMENT ON COLUMN auth.identities.email IS 'Auth: Email is a generated column that references the optional email property in the identity_data';
   905  
   906  
   907  --
   908  -- Name: instances; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
   909  --
   910  
   911  CREATE TABLE IF NOT EXISTS auth.instances (
   912      id uuid NOT NULL,
   913      uuid uuid,
   914      raw_base_config text,
   915      created_at timestamp with time zone,
   916      updated_at timestamp with time zone
   917  );
   918  
   919  
   920  ALTER TABLE auth.instances OWNER TO supabase_auth_admin;
   921  
   922  --
   923  -- Name: TABLE instances; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
   924  --
   925  
   926  COMMENT ON TABLE auth.instances IS 'Auth: Manages users across multiple sites.';
   927  
   928  
   929  --
   930  -- Name: mfa_amr_claims; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
   931  --
   932  
   933  CREATE TABLE IF NOT EXISTS auth.mfa_amr_claims (
   934      session_id uuid NOT NULL,
   935      created_at timestamp with time zone NOT NULL,
   936      updated_at timestamp with time zone NOT NULL,
   937      authentication_method text NOT NULL,
   938      id uuid NOT NULL
   939  );
   940  
   941  
   942  ALTER TABLE auth.mfa_amr_claims OWNER TO supabase_auth_admin;
   943  
   944  --
   945  -- Name: TABLE mfa_amr_claims; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
   946  --
   947  
   948  COMMENT ON TABLE auth.mfa_amr_claims IS 'auth: stores authenticator method reference claims for multi factor authentication';
   949  
   950  
   951  --
   952  -- Name: mfa_challenges; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
   953  --
   954  
   955  CREATE TABLE IF NOT EXISTS auth.mfa_challenges (
   956      id uuid NOT NULL,
   957      factor_id uuid NOT NULL,
   958      created_at timestamp with time zone NOT NULL,
   959      verified_at timestamp with time zone,
   960      ip_address inet NOT NULL
   961  );
   962  
   963  
   964  ALTER TABLE auth.mfa_challenges OWNER TO supabase_auth_admin;
   965  
   966  --
   967  -- Name: TABLE mfa_challenges; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
   968  --
   969  
   970  COMMENT ON TABLE auth.mfa_challenges IS 'auth: stores metadata about challenge requests made';
   971  
   972  
   973  --
   974  -- Name: mfa_factors; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
   975  --
   976  
   977  CREATE TABLE IF NOT EXISTS auth.mfa_factors (
   978      id uuid NOT NULL,
   979      user_id uuid NOT NULL,
   980      friendly_name text,
   981      factor_type auth.factor_type NOT NULL,
   982      status auth.factor_status NOT NULL,
   983      created_at timestamp with time zone NOT NULL,
   984      updated_at timestamp with time zone NOT NULL,
   985      secret text
   986  );
   987  
   988  
   989  ALTER TABLE auth.mfa_factors OWNER TO supabase_auth_admin;
   990  
   991  --
   992  -- Name: TABLE mfa_factors; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
   993  --
   994  
   995  COMMENT ON TABLE auth.mfa_factors IS 'auth: stores metadata about factors';
   996  
   997  
   998  --
   999  -- Name: refresh_tokens; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
  1000  --
  1001  
  1002  CREATE TABLE IF NOT EXISTS auth.refresh_tokens (
  1003      instance_id uuid,
  1004      id bigint NOT NULL,
  1005      token character varying(255),
  1006      user_id character varying(255),
  1007      revoked boolean,
  1008      created_at timestamp with time zone,
  1009      updated_at timestamp with time zone,
  1010      parent character varying(255),
  1011      session_id uuid
  1012  );
  1013  
  1014  
  1015  ALTER TABLE auth.refresh_tokens OWNER TO supabase_auth_admin;
  1016  
  1017  --
  1018  -- Name: TABLE refresh_tokens; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1019  --
  1020  
  1021  COMMENT ON TABLE auth.refresh_tokens IS 'Auth: Store of tokens used to refresh JWT tokens once they expire.';
  1022  
  1023  
  1024  --
  1025  -- Name: refresh_tokens_id_seq; Type: SEQUENCE; Schema: auth; Owner: supabase_auth_admin
  1026  --
  1027  
  1028  CREATE SEQUENCE IF NOT EXISTS auth.refresh_tokens_id_seq
  1029      START WITH 1
  1030      INCREMENT BY 1
  1031      NO MINVALUE
  1032      NO MAXVALUE
  1033      CACHE 1;
  1034  
  1035  
  1036  ALTER TABLE auth.refresh_tokens_id_seq OWNER TO supabase_auth_admin;
  1037  
  1038  --
  1039  -- Name: refresh_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: auth; Owner: supabase_auth_admin
  1040  --
  1041  
  1042  ALTER SEQUENCE auth.refresh_tokens_id_seq OWNED BY auth.refresh_tokens.id;
  1043  
  1044  
  1045  --
  1046  -- Name: saml_providers; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
  1047  --
  1048  
  1049  CREATE TABLE IF NOT EXISTS auth.saml_providers (
  1050      id uuid NOT NULL,
  1051      sso_provider_id uuid NOT NULL,
  1052      entity_id text NOT NULL,
  1053      metadata_xml text NOT NULL,
  1054      metadata_url text,
  1055      attribute_mapping jsonb,
  1056      created_at timestamp with time zone,
  1057      updated_at timestamp with time zone,
  1058      CONSTRAINT "entity_id not empty" CHECK ((char_length(entity_id) > 0)),
  1059      CONSTRAINT "metadata_url not empty" CHECK (((metadata_url = NULL::text) OR (char_length(metadata_url) > 0))),
  1060      CONSTRAINT "metadata_xml not empty" CHECK ((char_length(metadata_xml) > 0))
  1061  );
  1062  
  1063  
  1064  ALTER TABLE auth.saml_providers OWNER TO supabase_auth_admin;
  1065  
  1066  --
  1067  -- Name: TABLE saml_providers; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1068  --
  1069  
  1070  COMMENT ON TABLE auth.saml_providers IS 'Auth: Manages SAML Identity Provider connections.';
  1071  
  1072  
  1073  --
  1074  -- Name: saml_relay_states; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
  1075  --
  1076  
  1077  CREATE TABLE IF NOT EXISTS auth.saml_relay_states (
  1078      id uuid NOT NULL,
  1079      sso_provider_id uuid NOT NULL,
  1080      request_id text NOT NULL,
  1081      for_email text,
  1082      redirect_to text,
  1083      from_ip_address inet,
  1084      created_at timestamp with time zone,
  1085      updated_at timestamp with time zone,
  1086      CONSTRAINT "request_id not empty" CHECK ((char_length(request_id) > 0))
  1087  );
  1088  
  1089  
  1090  ALTER TABLE auth.saml_relay_states OWNER TO supabase_auth_admin;
  1091  
  1092  --
  1093  -- Name: TABLE saml_relay_states; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1094  --
  1095  
  1096  COMMENT ON TABLE auth.saml_relay_states IS 'Auth: Contains SAML Relay State information for each Service Provider initiated login.';
  1097  
  1098  
  1099  --
  1100  -- Name: schema_migrations; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
  1101  --
  1102  
  1103  CREATE TABLE IF NOT EXISTS auth.schema_migrations (
  1104      version character varying(255) NOT NULL
  1105  );
  1106  
  1107  
  1108  ALTER TABLE auth.schema_migrations OWNER TO supabase_auth_admin;
  1109  
  1110  --
  1111  -- Name: TABLE schema_migrations; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1112  --
  1113  
  1114  COMMENT ON TABLE auth.schema_migrations IS 'Auth: Manages updates to the auth system.';
  1115  
  1116  
  1117  --
  1118  -- Name: sessions; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
  1119  --
  1120  
  1121  CREATE TABLE IF NOT EXISTS auth.sessions (
  1122      id uuid NOT NULL,
  1123      user_id uuid NOT NULL,
  1124      created_at timestamp with time zone,
  1125      updated_at timestamp with time zone,
  1126      factor_id uuid,
  1127      aal auth.aal_level,
  1128      not_after timestamp with time zone
  1129  );
  1130  
  1131  
  1132  ALTER TABLE auth.sessions OWNER TO supabase_auth_admin;
  1133  
  1134  --
  1135  -- Name: TABLE sessions; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1136  --
  1137  
  1138  COMMENT ON TABLE auth.sessions IS 'Auth: Stores session data associated to a user.';
  1139  
  1140  
  1141  --
  1142  -- Name: COLUMN sessions.not_after; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1143  --
  1144  
  1145  COMMENT ON COLUMN auth.sessions.not_after IS 'Auth: Not after is a nullable column that contains a timestamp after which the session should be regarded as expired.';
  1146  
  1147  
  1148  --
  1149  -- Name: sso_domains; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
  1150  --
  1151  
  1152  CREATE TABLE IF NOT EXISTS auth.sso_domains (
  1153      id uuid NOT NULL,
  1154      sso_provider_id uuid NOT NULL,
  1155      domain text NOT NULL,
  1156      created_at timestamp with time zone,
  1157      updated_at timestamp with time zone,
  1158      CONSTRAINT "domain not empty" CHECK ((char_length(domain) > 0))
  1159  );
  1160  
  1161  
  1162  ALTER TABLE auth.sso_domains OWNER TO supabase_auth_admin;
  1163  
  1164  --
  1165  -- Name: TABLE sso_domains; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1166  --
  1167  
  1168  COMMENT ON TABLE auth.sso_domains IS 'Auth: Manages SSO email address domain mapping to an SSO Identity Provider.';
  1169  
  1170  
  1171  --
  1172  -- Name: sso_providers; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
  1173  --
  1174  
  1175  CREATE TABLE IF NOT EXISTS auth.sso_providers (
  1176      id uuid NOT NULL,
  1177      resource_id text,
  1178      created_at timestamp with time zone,
  1179      updated_at timestamp with time zone,
  1180      CONSTRAINT "resource_id not empty" CHECK (((resource_id = NULL::text) OR (char_length(resource_id) > 0)))
  1181  );
  1182  
  1183  
  1184  ALTER TABLE auth.sso_providers OWNER TO supabase_auth_admin;
  1185  
  1186  --
  1187  -- Name: TABLE sso_providers; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1188  --
  1189  
  1190  COMMENT ON TABLE auth.sso_providers IS 'Auth: Manages SSO identity provider information; see saml_providers for SAML.';
  1191  
  1192  
  1193  --
  1194  -- Name: COLUMN sso_providers.resource_id; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1195  --
  1196  
  1197  COMMENT ON COLUMN auth.sso_providers.resource_id IS 'Auth: Uniquely identifies a SSO provider according to a user-chosen resource ID (case insensitive), useful in infrastructure as code.';
  1198  
  1199  
  1200  --
  1201  -- Name: users; Type: TABLE; Schema: auth; Owner: supabase_auth_admin
  1202  --
  1203  
  1204  CREATE TABLE IF NOT EXISTS auth.users (
  1205      instance_id uuid,
  1206      id uuid NOT NULL,
  1207      aud character varying(255),
  1208      role character varying(255),
  1209      email character varying(255),
  1210      encrypted_password character varying(255),
  1211      email_confirmed_at timestamp with time zone,
  1212      invited_at timestamp with time zone,
  1213      confirmation_token character varying(255),
  1214      confirmation_sent_at timestamp with time zone,
  1215      recovery_token character varying(255),
  1216      recovery_sent_at timestamp with time zone,
  1217      email_change_token_new character varying(255),
  1218      email_change character varying(255),
  1219      email_change_sent_at timestamp with time zone,
  1220      last_sign_in_at timestamp with time zone,
  1221      raw_app_meta_data jsonb,
  1222      raw_user_meta_data jsonb,
  1223      is_super_admin boolean,
  1224      created_at timestamp with time zone,
  1225      updated_at timestamp with time zone,
  1226      phone character varying(15) DEFAULT NULL::character varying,
  1227      phone_confirmed_at timestamp with time zone,
  1228      phone_change character varying(15) DEFAULT ''::character varying,
  1229      phone_change_token character varying(255) DEFAULT ''::character varying,
  1230      phone_change_sent_at timestamp with time zone,
  1231      confirmed_at timestamp with time zone GENERATED ALWAYS AS (LEAST(email_confirmed_at, phone_confirmed_at)) STORED,
  1232      email_change_token_current character varying(255) DEFAULT ''::character varying,
  1233      email_change_confirm_status smallint DEFAULT 0,
  1234      banned_until timestamp with time zone,
  1235      reauthentication_token character varying(255) DEFAULT ''::character varying,
  1236      reauthentication_sent_at timestamp with time zone,
  1237      is_sso_user boolean DEFAULT false NOT NULL,
  1238      CONSTRAINT users_email_change_confirm_status_check CHECK (((email_change_confirm_status >= 0) AND (email_change_confirm_status <= 2)))
  1239  );
  1240  
  1241  
  1242  ALTER TABLE auth.users OWNER TO supabase_auth_admin;
  1243  
  1244  --
  1245  -- Name: TABLE users; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1246  --
  1247  
  1248  COMMENT ON TABLE auth.users IS 'Auth: Stores user login data within a secure schema.';
  1249  
  1250  
  1251  --
  1252  -- Name: COLUMN users.is_sso_user; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1253  --
  1254  
  1255  COMMENT ON COLUMN auth.users.is_sso_user IS 'Auth: Set this column to true when the account comes from SSO. These accounts can have duplicate emails.';
  1256  
  1257  
  1258  --
  1259  -- Name: buckets; Type: TABLE; Schema: storage; Owner: supabase_storage_admin
  1260  --
  1261  
  1262  CREATE TABLE IF NOT EXISTS storage.buckets (
  1263      id text NOT NULL,
  1264      name text NOT NULL,
  1265      owner uuid,
  1266      created_at timestamp with time zone DEFAULT now(),
  1267      updated_at timestamp with time zone DEFAULT now(),
  1268      public boolean DEFAULT false
  1269  );
  1270  
  1271  
  1272  ALTER TABLE storage.buckets OWNER TO supabase_storage_admin;
  1273  
  1274  --
  1275  -- Name: migrations; Type: TABLE; Schema: storage; Owner: supabase_storage_admin
  1276  --
  1277  
  1278  CREATE TABLE IF NOT EXISTS storage.migrations (
  1279      id integer NOT NULL,
  1280      name character varying(100) NOT NULL,
  1281      hash character varying(40) NOT NULL,
  1282      executed_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
  1283  );
  1284  
  1285  
  1286  ALTER TABLE storage.migrations OWNER TO supabase_storage_admin;
  1287  
  1288  --
  1289  -- Name: objects; Type: TABLE; Schema: storage; Owner: supabase_storage_admin
  1290  --
  1291  
  1292  CREATE TABLE IF NOT EXISTS storage.objects (
  1293      id uuid DEFAULT extensions.uuid_generate_v4() NOT NULL,
  1294      bucket_id text,
  1295      name text,
  1296      owner uuid,
  1297      created_at timestamp with time zone DEFAULT now(),
  1298      updated_at timestamp with time zone DEFAULT now(),
  1299      last_accessed_at timestamp with time zone DEFAULT now(),
  1300      metadata jsonb,
  1301      path_tokens text[] GENERATED ALWAYS AS (string_to_array(name, '/'::text)) STORED
  1302  );
  1303  
  1304  
  1305  ALTER TABLE storage.objects OWNER TO supabase_storage_admin;
  1306  
  1307  --
  1308  -- Name: refresh_tokens id; Type: DEFAULT; Schema: auth; Owner: supabase_auth_admin
  1309  --
  1310  
  1311  ALTER TABLE ONLY auth.refresh_tokens ALTER COLUMN id SET DEFAULT nextval('auth.refresh_tokens_id_seq'::regclass);
  1312  
  1313  
  1314  --
  1315  -- Data for Name: extensions; Type: TABLE DATA; Schema: _realtime; Owner: postgres
  1316  --
  1317  
  1318  INSERT INTO _realtime.extensions (id, type, settings, tenant_external_id, inserted_at, updated_at) VALUES ('20f62b3b-8906-49e4-8806-1e4c743afd79', 'postgres_cdc_rls', '{"region": "us-east-1", "db_host": "ABK7kBu27y/PVdL10i/b+A==", "db_name": "sWBpZNdjggEPTQVlI52Zfw==", "db_port": "+enMDFi1J/3IrrquHHwUmA==", "db_user": "sWBpZNdjggEPTQVlI52Zfw==", "slot_name": "supabase_realtime_replication_slot", "ip_version": 4, "db_password": "sWBpZNdjggEPTQVlI52Zfw==", "publication": "supabase_realtime", "poll_interval_ms": 100, "poll_max_changes": 100, "poll_max_record_bytes": 1048576}', 'realtime-dev', '2023-01-09 06:53:33', '2023-01-09 06:53:33');
  1319  
  1320  
  1321  --
  1322  -- Data for Name: schema_migrations; Type: TABLE DATA; Schema: _realtime; Owner: postgres
  1323  --
  1324  
  1325  INSERT INTO _realtime.schema_migrations (version, inserted_at) VALUES (20210706140551, '2023-01-09 06:53:30');
  1326  INSERT INTO _realtime.schema_migrations (version, inserted_at) VALUES (20220329161857, '2023-01-09 06:53:30');
  1327  INSERT INTO _realtime.schema_migrations (version, inserted_at) VALUES (20220410212326, '2023-01-09 06:53:30');
  1328  INSERT INTO _realtime.schema_migrations (version, inserted_at) VALUES (20220506102948, '2023-01-09 06:53:31');
  1329  INSERT INTO _realtime.schema_migrations (version, inserted_at) VALUES (20220527210857, '2023-01-09 06:53:31');
  1330  INSERT INTO _realtime.schema_migrations (version, inserted_at) VALUES (20220815211129, '2023-01-09 06:53:31');
  1331  INSERT INTO _realtime.schema_migrations (version, inserted_at) VALUES (20220815215024, '2023-01-09 06:53:31');
  1332  INSERT INTO _realtime.schema_migrations (version, inserted_at) VALUES (20220818141501, '2023-01-09 06:53:31');
  1333  INSERT INTO _realtime.schema_migrations (version, inserted_at) VALUES (20221018173709, '2023-01-09 06:53:31');
  1334  INSERT INTO _realtime.schema_migrations (version, inserted_at) VALUES (20221102172703, '2023-01-09 06:53:31');
  1335  INSERT INTO _realtime.schema_migrations (version, inserted_at) VALUES (20221223010058, '2023-01-09 06:53:31');
  1336  
  1337  
  1338  --
  1339  -- Data for Name: tenants; Type: TABLE DATA; Schema: _realtime; Owner: postgres
  1340  --
  1341  
  1342  INSERT INTO _realtime.tenants (id, name, external_id, jwt_secret, max_concurrent_users, inserted_at, updated_at, max_events_per_second, postgres_cdc_default) VALUES ('6b5dd60f-7ded-4bf4-8692-24bbbe92caa4', 'realtime-dev', 'realtime-dev', 'cor19x6wYudqK/HY8tKJOBoA0KD/zxM/SxxkI1zPOvSCs67x4q75+0yV07SWdm0T', 200, '2023-01-09 06:53:33', '2023-01-09 06:53:33', 100, 'postgres_cdc_rls');
  1343  
  1344  
  1345  --
  1346  -- Data for Name: audit_log_entries; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1347  --
  1348  
  1349  
  1350  
  1351  --
  1352  -- Data for Name: identities; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1353  --
  1354  
  1355  
  1356  
  1357  --
  1358  -- Data for Name: instances; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1359  --
  1360  
  1361  
  1362  
  1363  --
  1364  -- Data for Name: mfa_amr_claims; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1365  --
  1366  
  1367  
  1368  
  1369  --
  1370  -- Data for Name: mfa_challenges; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1371  --
  1372  
  1373  
  1374  
  1375  --
  1376  -- Data for Name: mfa_factors; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1377  --
  1378  
  1379  
  1380  
  1381  --
  1382  -- Data for Name: refresh_tokens; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1383  --
  1384  
  1385  
  1386  
  1387  --
  1388  -- Data for Name: saml_providers; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1389  --
  1390  
  1391  
  1392  
  1393  --
  1394  -- Data for Name: saml_relay_states; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1395  --
  1396  
  1397  
  1398  
  1399  --
  1400  -- Data for Name: schema_migrations; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1401  --
  1402  
  1403  INSERT INTO auth.schema_migrations (version) VALUES ('20171026211738');
  1404  INSERT INTO auth.schema_migrations (version) VALUES ('20171026211808');
  1405  INSERT INTO auth.schema_migrations (version) VALUES ('20171026211834');
  1406  INSERT INTO auth.schema_migrations (version) VALUES ('20180103212743');
  1407  INSERT INTO auth.schema_migrations (version) VALUES ('20180108183307');
  1408  INSERT INTO auth.schema_migrations (version) VALUES ('20180119214651');
  1409  INSERT INTO auth.schema_migrations (version) VALUES ('20180125194653');
  1410  INSERT INTO auth.schema_migrations (version) VALUES ('00');
  1411  INSERT INTO auth.schema_migrations (version) VALUES ('20210710035447');
  1412  INSERT INTO auth.schema_migrations (version) VALUES ('20210722035447');
  1413  INSERT INTO auth.schema_migrations (version) VALUES ('20210730183235');
  1414  INSERT INTO auth.schema_migrations (version) VALUES ('20210909172000');
  1415  INSERT INTO auth.schema_migrations (version) VALUES ('20210927181326');
  1416  INSERT INTO auth.schema_migrations (version) VALUES ('20211122151130');
  1417  INSERT INTO auth.schema_migrations (version) VALUES ('20211124214934');
  1418  INSERT INTO auth.schema_migrations (version) VALUES ('20211202183645');
  1419  INSERT INTO auth.schema_migrations (version) VALUES ('20220114185221');
  1420  INSERT INTO auth.schema_migrations (version) VALUES ('20220114185340');
  1421  INSERT INTO auth.schema_migrations (version) VALUES ('20220224000811');
  1422  INSERT INTO auth.schema_migrations (version) VALUES ('20220323170000');
  1423  INSERT INTO auth.schema_migrations (version) VALUES ('20220429102000');
  1424  INSERT INTO auth.schema_migrations (version) VALUES ('20220531120530');
  1425  INSERT INTO auth.schema_migrations (version) VALUES ('20220614074223');
  1426  INSERT INTO auth.schema_migrations (version) VALUES ('20220811173540');
  1427  INSERT INTO auth.schema_migrations (version) VALUES ('20221003041349');
  1428  INSERT INTO auth.schema_migrations (version) VALUES ('20221003041400');
  1429  INSERT INTO auth.schema_migrations (version) VALUES ('20221011041400');
  1430  INSERT INTO auth.schema_migrations (version) VALUES ('20221020193600');
  1431  INSERT INTO auth.schema_migrations (version) VALUES ('20221021073300');
  1432  INSERT INTO auth.schema_migrations (version) VALUES ('20221021082433');
  1433  INSERT INTO auth.schema_migrations (version) VALUES ('20221027105023');
  1434  INSERT INTO auth.schema_migrations (version) VALUES ('20221114143122');
  1435  INSERT INTO auth.schema_migrations (version) VALUES ('20221114143410');
  1436  INSERT INTO auth.schema_migrations (version) VALUES ('20221125140132');
  1437  INSERT INTO auth.schema_migrations (version) VALUES ('20221208132122');
  1438  INSERT INTO auth.schema_migrations (version) VALUES ('20221215195500');
  1439  INSERT INTO auth.schema_migrations (version) VALUES ('20221215195800');
  1440  INSERT INTO auth.schema_migrations (version) VALUES ('20221215195900');
  1441  
  1442  
  1443  --
  1444  -- Data for Name: sessions; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1445  --
  1446  
  1447  
  1448  
  1449  --
  1450  -- Data for Name: sso_domains; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1451  --
  1452  
  1453  
  1454  
  1455  --
  1456  -- Data for Name: sso_providers; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1457  --
  1458  
  1459  
  1460  
  1461  --
  1462  -- Data for Name: users; Type: TABLE DATA; Schema: auth; Owner: supabase_auth_admin
  1463  --
  1464  
  1465  
  1466  
  1467  --
  1468  -- Data for Name: buckets; Type: TABLE DATA; Schema: storage; Owner: supabase_storage_admin
  1469  --
  1470  
  1471  
  1472  
  1473  --
  1474  -- Data for Name: migrations; Type: TABLE DATA; Schema: storage; Owner: supabase_storage_admin
  1475  --
  1476  
  1477  INSERT INTO storage.migrations (id, name, hash, executed_at) VALUES (0, 'create-migrations-table', 'e18db593bcde2aca2a408c4d1100f6abba2195df', '2022-11-09 15:18:04.857739');
  1478  INSERT INTO storage.migrations (id, name, hash, executed_at) VALUES (1, 'initialmigration', '6ab16121fbaa08bbd11b712d05f358f9b555d777', '2022-11-09 15:18:04.8635');
  1479  INSERT INTO storage.migrations (id, name, hash, executed_at) VALUES (2, 'pathtoken-column', '49756be03be4c17bb85fe70d4a861f27de7e49ad', '2022-11-09 15:18:04.867172');
  1480  INSERT INTO storage.migrations (id, name, hash, executed_at) VALUES (3, 'add-migrations-rls', 'bb5d124c53d68635a883e399426c6a5a25fc893d', '2022-11-09 15:18:04.884924');
  1481  INSERT INTO storage.migrations (id, name, hash, executed_at) VALUES (4, 'add-size-functions', '6d79007d04f5acd288c9c250c42d2d5fd286c54d', '2022-11-09 15:18:04.888136');
  1482  INSERT INTO storage.migrations (id, name, hash, executed_at) VALUES (5, 'change-column-name-in-get-size', 'fd65688505d2ffa9fbdc58a944348dd8604d688c', '2022-11-09 15:18:04.891994');
  1483  INSERT INTO storage.migrations (id, name, hash, executed_at) VALUES (6, 'add-rls-to-buckets', '63e2bab75a2040fee8e3fb3f15a0d26f3380e9b6', '2022-11-09 15:18:04.895884');
  1484  INSERT INTO storage.migrations (id, name, hash, executed_at) VALUES (7, 'add-public-to-buckets', '82568934f8a4d9e0a85f126f6fb483ad8214c418', '2022-11-09 15:18:04.898973');
  1485  INSERT INTO storage.migrations (id, name, hash, executed_at) VALUES (8, 'fix-search-function', '1a43a40eddb525f2e2f26efd709e6c06e58e059c', '2022-11-09 15:18:04.902504');
  1486  INSERT INTO storage.migrations (id, name, hash, executed_at) VALUES (9, 'search-files-search-function', '34c096597eb8b9d077fdfdde9878c88501b2fafc', '2022-11-09 15:18:04.905764');
  1487  INSERT INTO storage.migrations (id, name, hash, executed_at) VALUES (10, 'add-trigger-to-auto-update-updated_at-column', '37d6bb964a70a822e6d37f22f457b9bca7885928', '2022-11-09 15:18:04.909316');
  1488  
  1489  
  1490  --
  1491  -- Data for Name: objects; Type: TABLE DATA; Schema: storage; Owner: supabase_storage_admin
  1492  --
  1493  
  1494  
  1495  
  1496  --
  1497  -- Name: refresh_tokens_id_seq; Type: SEQUENCE SET; Schema: auth; Owner: supabase_auth_admin
  1498  --
  1499  
  1500  SELECT pg_catalog.setval('auth.refresh_tokens_id_seq', 1, false);
  1501  
  1502  
  1503  --
  1504  -- Name: extensions extensions_pkey; Type: CONSTRAINT; Schema: _realtime; Owner: postgres
  1505  --
  1506  
  1507  ALTER TABLE ONLY _realtime.extensions
  1508      ADD CONSTRAINT extensions_pkey PRIMARY KEY (id);
  1509  
  1510  
  1511  --
  1512  -- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: _realtime; Owner: postgres
  1513  --
  1514  
  1515  ALTER TABLE ONLY _realtime.schema_migrations
  1516      ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
  1517  
  1518  
  1519  --
  1520  -- Name: tenants tenants_pkey; Type: CONSTRAINT; Schema: _realtime; Owner: postgres
  1521  --
  1522  
  1523  ALTER TABLE ONLY _realtime.tenants
  1524      ADD CONSTRAINT tenants_pkey PRIMARY KEY (id);
  1525  
  1526  
  1527  --
  1528  -- Name: mfa_amr_claims amr_id_pk; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1529  --
  1530  
  1531  ALTER TABLE ONLY auth.mfa_amr_claims
  1532      ADD CONSTRAINT amr_id_pk PRIMARY KEY (id);
  1533  
  1534  
  1535  --
  1536  -- Name: audit_log_entries audit_log_entries_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1537  --
  1538  
  1539  ALTER TABLE ONLY auth.audit_log_entries
  1540      ADD CONSTRAINT audit_log_entries_pkey PRIMARY KEY (id);
  1541  
  1542  
  1543  --
  1544  -- Name: identities identities_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1545  --
  1546  
  1547  ALTER TABLE ONLY auth.identities
  1548      ADD CONSTRAINT identities_pkey PRIMARY KEY (provider, id);
  1549  
  1550  
  1551  --
  1552  -- Name: instances instances_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1553  --
  1554  
  1555  ALTER TABLE ONLY auth.instances
  1556      ADD CONSTRAINT instances_pkey PRIMARY KEY (id);
  1557  
  1558  
  1559  --
  1560  -- Name: mfa_amr_claims mfa_amr_claims_session_id_authentication_method_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1561  --
  1562  
  1563  ALTER TABLE ONLY auth.mfa_amr_claims
  1564      ADD CONSTRAINT mfa_amr_claims_session_id_authentication_method_pkey UNIQUE (session_id, authentication_method);
  1565  
  1566  
  1567  --
  1568  -- Name: mfa_challenges mfa_challenges_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1569  --
  1570  
  1571  ALTER TABLE ONLY auth.mfa_challenges
  1572      ADD CONSTRAINT mfa_challenges_pkey PRIMARY KEY (id);
  1573  
  1574  
  1575  --
  1576  -- Name: mfa_factors mfa_factors_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1577  --
  1578  
  1579  ALTER TABLE ONLY auth.mfa_factors
  1580      ADD CONSTRAINT mfa_factors_pkey PRIMARY KEY (id);
  1581  
  1582  
  1583  --
  1584  -- Name: refresh_tokens refresh_tokens_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1585  --
  1586  
  1587  ALTER TABLE ONLY auth.refresh_tokens
  1588      ADD CONSTRAINT refresh_tokens_pkey PRIMARY KEY (id);
  1589  
  1590  
  1591  --
  1592  -- Name: refresh_tokens refresh_tokens_token_unique; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1593  --
  1594  
  1595  ALTER TABLE ONLY auth.refresh_tokens
  1596      ADD CONSTRAINT refresh_tokens_token_unique UNIQUE (token);
  1597  
  1598  
  1599  --
  1600  -- Name: saml_providers saml_providers_entity_id_key; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1601  --
  1602  
  1603  ALTER TABLE ONLY auth.saml_providers
  1604      ADD CONSTRAINT saml_providers_entity_id_key UNIQUE (entity_id);
  1605  
  1606  
  1607  --
  1608  -- Name: saml_providers saml_providers_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1609  --
  1610  
  1611  ALTER TABLE ONLY auth.saml_providers
  1612      ADD CONSTRAINT saml_providers_pkey PRIMARY KEY (id);
  1613  
  1614  
  1615  --
  1616  -- Name: saml_relay_states saml_relay_states_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1617  --
  1618  
  1619  ALTER TABLE ONLY auth.saml_relay_states
  1620      ADD CONSTRAINT saml_relay_states_pkey PRIMARY KEY (id);
  1621  
  1622  
  1623  --
  1624  -- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1625  --
  1626  
  1627  ALTER TABLE ONLY auth.schema_migrations
  1628      ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
  1629  
  1630  
  1631  --
  1632  -- Name: sessions sessions_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1633  --
  1634  
  1635  ALTER TABLE ONLY auth.sessions
  1636      ADD CONSTRAINT sessions_pkey PRIMARY KEY (id);
  1637  
  1638  
  1639  --
  1640  -- Name: sso_domains sso_domains_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1641  --
  1642  
  1643  ALTER TABLE ONLY auth.sso_domains
  1644      ADD CONSTRAINT sso_domains_pkey PRIMARY KEY (id);
  1645  
  1646  
  1647  --
  1648  -- Name: sso_providers sso_providers_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1649  --
  1650  
  1651  ALTER TABLE ONLY auth.sso_providers
  1652      ADD CONSTRAINT sso_providers_pkey PRIMARY KEY (id);
  1653  
  1654  
  1655  --
  1656  -- Name: users users_phone_key; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1657  --
  1658  
  1659  ALTER TABLE ONLY auth.users
  1660      ADD CONSTRAINT users_phone_key UNIQUE (phone);
  1661  
  1662  
  1663  --
  1664  -- Name: users users_pkey; Type: CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1665  --
  1666  
  1667  ALTER TABLE ONLY auth.users
  1668      ADD CONSTRAINT users_pkey PRIMARY KEY (id);
  1669  
  1670  
  1671  --
  1672  -- Name: buckets buckets_pkey; Type: CONSTRAINT; Schema: storage; Owner: supabase_storage_admin
  1673  --
  1674  
  1675  ALTER TABLE ONLY storage.buckets
  1676      ADD CONSTRAINT buckets_pkey PRIMARY KEY (id);
  1677  
  1678  
  1679  --
  1680  -- Name: migrations migrations_name_key; Type: CONSTRAINT; Schema: storage; Owner: supabase_storage_admin
  1681  --
  1682  
  1683  ALTER TABLE ONLY storage.migrations
  1684      ADD CONSTRAINT migrations_name_key UNIQUE (name);
  1685  
  1686  
  1687  --
  1688  -- Name: migrations migrations_pkey; Type: CONSTRAINT; Schema: storage; Owner: supabase_storage_admin
  1689  --
  1690  
  1691  ALTER TABLE ONLY storage.migrations
  1692      ADD CONSTRAINT migrations_pkey PRIMARY KEY (id);
  1693  
  1694  
  1695  --
  1696  -- Name: objects objects_pkey; Type: CONSTRAINT; Schema: storage; Owner: supabase_storage_admin
  1697  --
  1698  
  1699  ALTER TABLE ONLY storage.objects
  1700      ADD CONSTRAINT objects_pkey PRIMARY KEY (id);
  1701  
  1702  
  1703  --
  1704  -- Name: extensions_tenant_external_id_type_index; Type: INDEX; Schema: _realtime; Owner: postgres
  1705  --
  1706  
  1707  CREATE UNIQUE INDEX extensions_tenant_external_id_type_index ON _realtime.extensions USING btree (tenant_external_id, type);
  1708  
  1709  
  1710  --
  1711  -- Name: tenants_external_id_index; Type: INDEX; Schema: _realtime; Owner: postgres
  1712  --
  1713  
  1714  CREATE UNIQUE INDEX tenants_external_id_index ON _realtime.tenants USING btree (external_id);
  1715  
  1716  
  1717  --
  1718  -- Name: audit_logs_instance_id_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1719  --
  1720  
  1721  CREATE INDEX audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id);
  1722  
  1723  
  1724  --
  1725  -- Name: confirmation_token_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1726  --
  1727  
  1728  CREATE UNIQUE INDEX confirmation_token_idx ON auth.users USING btree (confirmation_token) WHERE ((confirmation_token)::text !~ '^[0-9 ]*$'::text);
  1729  
  1730  
  1731  --
  1732  -- Name: email_change_token_current_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1733  --
  1734  
  1735  CREATE UNIQUE INDEX email_change_token_current_idx ON auth.users USING btree (email_change_token_current) WHERE ((email_change_token_current)::text !~ '^[0-9 ]*$'::text);
  1736  
  1737  
  1738  --
  1739  -- Name: email_change_token_new_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1740  --
  1741  
  1742  CREATE UNIQUE INDEX email_change_token_new_idx ON auth.users USING btree (email_change_token_new) WHERE ((email_change_token_new)::text !~ '^[0-9 ]*$'::text);
  1743  
  1744  
  1745  --
  1746  -- Name: factor_id_created_at_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1747  --
  1748  
  1749  CREATE INDEX factor_id_created_at_idx ON auth.mfa_factors USING btree (user_id, created_at);
  1750  
  1751  
  1752  --
  1753  -- Name: identities_email_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1754  --
  1755  
  1756  CREATE INDEX identities_email_idx ON auth.identities USING btree (email text_pattern_ops);
  1757  
  1758  
  1759  --
  1760  -- Name: INDEX identities_email_idx; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1761  --
  1762  
  1763  COMMENT ON INDEX auth.identities_email_idx IS 'Auth: Ensures indexed queries on the email column';
  1764  
  1765  
  1766  --
  1767  -- Name: identities_user_id_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1768  --
  1769  
  1770  CREATE INDEX identities_user_id_idx ON auth.identities USING btree (user_id);
  1771  
  1772  
  1773  --
  1774  -- Name: mfa_factors_user_friendly_name_unique; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1775  --
  1776  
  1777  CREATE UNIQUE INDEX mfa_factors_user_friendly_name_unique ON auth.mfa_factors USING btree (friendly_name, user_id) WHERE (TRIM(BOTH FROM friendly_name) <> ''::text);
  1778  
  1779  
  1780  --
  1781  -- Name: reauthentication_token_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1782  --
  1783  
  1784  CREATE UNIQUE INDEX reauthentication_token_idx ON auth.users USING btree (reauthentication_token) WHERE ((reauthentication_token)::text !~ '^[0-9 ]*$'::text);
  1785  
  1786  
  1787  --
  1788  -- Name: recovery_token_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1789  --
  1790  
  1791  CREATE UNIQUE INDEX recovery_token_idx ON auth.users USING btree (recovery_token) WHERE ((recovery_token)::text !~ '^[0-9 ]*$'::text);
  1792  
  1793  
  1794  --
  1795  -- Name: refresh_tokens_instance_id_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1796  --
  1797  
  1798  CREATE INDEX refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id);
  1799  
  1800  
  1801  --
  1802  -- Name: refresh_tokens_instance_id_user_id_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1803  --
  1804  
  1805  CREATE INDEX refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id);
  1806  
  1807  
  1808  --
  1809  -- Name: refresh_tokens_parent_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1810  --
  1811  
  1812  CREATE INDEX refresh_tokens_parent_idx ON auth.refresh_tokens USING btree (parent);
  1813  
  1814  
  1815  --
  1816  -- Name: refresh_tokens_session_id_revoked_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1817  --
  1818  
  1819  CREATE INDEX refresh_tokens_session_id_revoked_idx ON auth.refresh_tokens USING btree (session_id, revoked);
  1820  
  1821  
  1822  --
  1823  -- Name: refresh_tokens_token_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1824  --
  1825  
  1826  CREATE INDEX refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token);
  1827  
  1828  
  1829  --
  1830  -- Name: saml_providers_sso_provider_id_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1831  --
  1832  
  1833  CREATE INDEX saml_providers_sso_provider_id_idx ON auth.saml_providers USING btree (sso_provider_id);
  1834  
  1835  
  1836  --
  1837  -- Name: saml_relay_states_for_email_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1838  --
  1839  
  1840  CREATE INDEX saml_relay_states_for_email_idx ON auth.saml_relay_states USING btree (for_email);
  1841  
  1842  
  1843  --
  1844  -- Name: saml_relay_states_sso_provider_id_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1845  --
  1846  
  1847  CREATE INDEX saml_relay_states_sso_provider_id_idx ON auth.saml_relay_states USING btree (sso_provider_id);
  1848  
  1849  
  1850  --
  1851  -- Name: sessions_user_id_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1852  --
  1853  
  1854  CREATE INDEX sessions_user_id_idx ON auth.sessions USING btree (user_id);
  1855  
  1856  
  1857  --
  1858  -- Name: sso_domains_domain_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1859  --
  1860  
  1861  CREATE UNIQUE INDEX sso_domains_domain_idx ON auth.sso_domains USING btree (lower(domain));
  1862  
  1863  
  1864  --
  1865  -- Name: sso_domains_sso_provider_id_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1866  --
  1867  
  1868  CREATE INDEX sso_domains_sso_provider_id_idx ON auth.sso_domains USING btree (sso_provider_id);
  1869  
  1870  
  1871  --
  1872  -- Name: sso_providers_resource_id_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1873  --
  1874  
  1875  CREATE UNIQUE INDEX sso_providers_resource_id_idx ON auth.sso_providers USING btree (lower(resource_id));
  1876  
  1877  
  1878  --
  1879  -- Name: user_id_created_at_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1880  --
  1881  
  1882  CREATE INDEX user_id_created_at_idx ON auth.sessions USING btree (user_id, created_at);
  1883  
  1884  
  1885  --
  1886  -- Name: users_email_partial_key; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1887  --
  1888  
  1889  CREATE UNIQUE INDEX users_email_partial_key ON auth.users USING btree (email) WHERE (is_sso_user = false);
  1890  
  1891  
  1892  --
  1893  -- Name: INDEX users_email_partial_key; Type: COMMENT; Schema: auth; Owner: supabase_auth_admin
  1894  --
  1895  
  1896  COMMENT ON INDEX auth.users_email_partial_key IS 'Auth: A partial unique index that applies only when is_sso_user is false';
  1897  
  1898  
  1899  --
  1900  -- Name: users_instance_id_email_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1901  --
  1902  
  1903  CREATE INDEX users_instance_id_email_idx ON auth.users USING btree (instance_id, lower((email)::text));
  1904  
  1905  
  1906  --
  1907  -- Name: users_instance_id_idx; Type: INDEX; Schema: auth; Owner: supabase_auth_admin
  1908  --
  1909  
  1910  CREATE INDEX users_instance_id_idx ON auth.users USING btree (instance_id);
  1911  
  1912  
  1913  --
  1914  -- Name: bname; Type: INDEX; Schema: storage; Owner: supabase_storage_admin
  1915  --
  1916  
  1917  CREATE UNIQUE INDEX bname ON storage.buckets USING btree (name);
  1918  
  1919  
  1920  --
  1921  -- Name: bucketid_objname; Type: INDEX; Schema: storage; Owner: supabase_storage_admin
  1922  --
  1923  
  1924  CREATE UNIQUE INDEX bucketid_objname ON storage.objects USING btree (bucket_id, name);
  1925  
  1926  
  1927  --
  1928  -- Name: name_prefix_search; Type: INDEX; Schema: storage; Owner: supabase_storage_admin
  1929  --
  1930  
  1931  CREATE INDEX name_prefix_search ON storage.objects USING btree (name text_pattern_ops);
  1932  
  1933  
  1934  --
  1935  -- Name: objects update_objects_updated_at; Type: TRIGGER; Schema: storage; Owner: supabase_storage_admin
  1936  --
  1937  
  1938  CREATE TRIGGER update_objects_updated_at BEFORE UPDATE ON storage.objects FOR EACH ROW EXECUTE FUNCTION storage.update_updated_at_column();
  1939  
  1940  
  1941  --
  1942  -- Name: extensions extensions_tenant_external_id_fkey; Type: FK CONSTRAINT; Schema: _realtime; Owner: postgres
  1943  --
  1944  
  1945  ALTER TABLE ONLY _realtime.extensions
  1946      ADD CONSTRAINT extensions_tenant_external_id_fkey FOREIGN KEY (tenant_external_id) REFERENCES _realtime.tenants(external_id) ON DELETE CASCADE;
  1947  
  1948  
  1949  --
  1950  -- Name: identities identities_user_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1951  --
  1952  
  1953  ALTER TABLE ONLY auth.identities
  1954      ADD CONSTRAINT identities_user_id_fkey FOREIGN KEY (user_id) REFERENCES auth.users(id) ON DELETE CASCADE;
  1955  
  1956  
  1957  --
  1958  -- Name: mfa_amr_claims mfa_amr_claims_session_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1959  --
  1960  
  1961  ALTER TABLE ONLY auth.mfa_amr_claims
  1962      ADD CONSTRAINT mfa_amr_claims_session_id_fkey FOREIGN KEY (session_id) REFERENCES auth.sessions(id) ON DELETE CASCADE;
  1963  
  1964  
  1965  --
  1966  -- Name: mfa_challenges mfa_challenges_auth_factor_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1967  --
  1968  
  1969  ALTER TABLE ONLY auth.mfa_challenges
  1970      ADD CONSTRAINT mfa_challenges_auth_factor_id_fkey FOREIGN KEY (factor_id) REFERENCES auth.mfa_factors(id) ON DELETE CASCADE;
  1971  
  1972  
  1973  --
  1974  -- Name: mfa_factors mfa_factors_user_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1975  --
  1976  
  1977  ALTER TABLE ONLY auth.mfa_factors
  1978      ADD CONSTRAINT mfa_factors_user_id_fkey FOREIGN KEY (user_id) REFERENCES auth.users(id) ON DELETE CASCADE;
  1979  
  1980  
  1981  --
  1982  -- Name: refresh_tokens refresh_tokens_session_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1983  --
  1984  
  1985  ALTER TABLE ONLY auth.refresh_tokens
  1986      ADD CONSTRAINT refresh_tokens_session_id_fkey FOREIGN KEY (session_id) REFERENCES auth.sessions(id) ON DELETE CASCADE;
  1987  
  1988  
  1989  --
  1990  -- Name: saml_providers saml_providers_sso_provider_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1991  --
  1992  
  1993  ALTER TABLE ONLY auth.saml_providers
  1994      ADD CONSTRAINT saml_providers_sso_provider_id_fkey FOREIGN KEY (sso_provider_id) REFERENCES auth.sso_providers(id) ON DELETE CASCADE;
  1995  
  1996  
  1997  --
  1998  -- Name: saml_relay_states saml_relay_states_sso_provider_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  1999  --
  2000  
  2001  ALTER TABLE ONLY auth.saml_relay_states
  2002      ADD CONSTRAINT saml_relay_states_sso_provider_id_fkey FOREIGN KEY (sso_provider_id) REFERENCES auth.sso_providers(id) ON DELETE CASCADE;
  2003  
  2004  
  2005  --
  2006  -- Name: sessions sessions_user_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  2007  --
  2008  
  2009  ALTER TABLE ONLY auth.sessions
  2010      ADD CONSTRAINT sessions_user_id_fkey FOREIGN KEY (user_id) REFERENCES auth.users(id) ON DELETE CASCADE;
  2011  
  2012  
  2013  --
  2014  -- Name: sso_domains sso_domains_sso_provider_id_fkey; Type: FK CONSTRAINT; Schema: auth; Owner: supabase_auth_admin
  2015  --
  2016  
  2017  ALTER TABLE ONLY auth.sso_domains
  2018      ADD CONSTRAINT sso_domains_sso_provider_id_fkey FOREIGN KEY (sso_provider_id) REFERENCES auth.sso_providers(id) ON DELETE CASCADE;
  2019  
  2020  
  2021  --
  2022  -- Name: buckets buckets_owner_fkey; Type: FK CONSTRAINT; Schema: storage; Owner: supabase_storage_admin
  2023  --
  2024  
  2025  ALTER TABLE ONLY storage.buckets
  2026      ADD CONSTRAINT buckets_owner_fkey FOREIGN KEY (owner) REFERENCES auth.users(id);
  2027  
  2028  
  2029  --
  2030  -- Name: objects objects_bucketId_fkey; Type: FK CONSTRAINT; Schema: storage; Owner: supabase_storage_admin
  2031  --
  2032  
  2033  ALTER TABLE ONLY storage.objects
  2034      ADD CONSTRAINT "objects_bucketId_fkey" FOREIGN KEY (bucket_id) REFERENCES storage.buckets(id);
  2035  
  2036  
  2037  --
  2038  -- Name: objects objects_owner_fkey; Type: FK CONSTRAINT; Schema: storage; Owner: supabase_storage_admin
  2039  --
  2040  
  2041  ALTER TABLE ONLY storage.objects
  2042      ADD CONSTRAINT objects_owner_fkey FOREIGN KEY (owner) REFERENCES auth.users(id);
  2043  
  2044  
  2045  --
  2046  -- Name: buckets; Type: ROW SECURITY; Schema: storage; Owner: supabase_storage_admin
  2047  --
  2048  
  2049  ALTER TABLE storage.buckets ENABLE ROW LEVEL SECURITY;
  2050  
  2051  --
  2052  -- Name: migrations; Type: ROW SECURITY; Schema: storage; Owner: supabase_storage_admin
  2053  --
  2054  
  2055  ALTER TABLE storage.migrations ENABLE ROW LEVEL SECURITY;
  2056  
  2057  --
  2058  -- Name: objects; Type: ROW SECURITY; Schema: storage; Owner: supabase_storage_admin
  2059  --
  2060  
  2061  ALTER TABLE storage.objects ENABLE ROW LEVEL SECURITY;
  2062  
  2063  --
  2064  -- Name: supabase_realtime; Type: PUBLICATION; Schema: -; Owner: postgres
  2065  --
  2066  
  2067  CREATE PUBLICATION supabase_realtime WITH (publish = 'insert, update, delete, truncate');
  2068  
  2069  
  2070  ALTER PUBLICATION supabase_realtime OWNER TO postgres;
  2071  
  2072  --
  2073  -- Name: SCHEMA auth; Type: ACL; Schema: -; Owner: supabase_admin
  2074  --
  2075  
  2076  GRANT USAGE ON SCHEMA auth TO anon;
  2077  GRANT USAGE ON SCHEMA auth TO authenticated;
  2078  GRANT USAGE ON SCHEMA auth TO service_role;
  2079  GRANT ALL ON SCHEMA auth TO supabase_auth_admin;
  2080  GRANT ALL ON SCHEMA auth TO dashboard_user;
  2081  GRANT ALL ON SCHEMA auth TO postgres;
  2082  
  2083  
  2084  --
  2085  -- Name: SCHEMA extensions; Type: ACL; Schema: -; Owner: postgres
  2086  --
  2087  
  2088  GRANT USAGE ON SCHEMA extensions TO anon;
  2089  GRANT USAGE ON SCHEMA extensions TO authenticated;
  2090  GRANT USAGE ON SCHEMA extensions TO service_role;
  2091  GRANT ALL ON SCHEMA extensions TO dashboard_user;
  2092  
  2093  
  2094  --
  2095  -- Name: SCHEMA graphql_public; Type: ACL; Schema: -; Owner: supabase_admin
  2096  --
  2097  
  2098  GRANT USAGE ON SCHEMA graphql_public TO postgres;
  2099  GRANT USAGE ON SCHEMA graphql_public TO anon;
  2100  GRANT USAGE ON SCHEMA graphql_public TO authenticated;
  2101  GRANT USAGE ON SCHEMA graphql_public TO service_role;
  2102  
  2103  
  2104  --
  2105  -- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres
  2106  --
  2107  
  2108  REVOKE USAGE ON SCHEMA public FROM PUBLIC;
  2109  GRANT ALL ON SCHEMA public TO PUBLIC;
  2110  GRANT USAGE ON SCHEMA public TO anon;
  2111  GRANT USAGE ON SCHEMA public TO authenticated;
  2112  GRANT USAGE ON SCHEMA public TO service_role;
  2113  
  2114  
  2115  --
  2116  -- Name: SCHEMA realtime; Type: ACL; Schema: -; Owner: supabase_admin
  2117  --
  2118  
  2119  GRANT USAGE ON SCHEMA realtime TO postgres;
  2120  
  2121  
  2122  --
  2123  -- Name: SCHEMA storage; Type: ACL; Schema: -; Owner: supabase_admin
  2124  --
  2125  
  2126  GRANT ALL ON SCHEMA storage TO postgres;
  2127  GRANT USAGE ON SCHEMA storage TO anon;
  2128  GRANT USAGE ON SCHEMA storage TO authenticated;
  2129  GRANT USAGE ON SCHEMA storage TO service_role;
  2130  GRANT ALL ON SCHEMA storage TO supabase_storage_admin;
  2131  GRANT ALL ON SCHEMA storage TO dashboard_user;
  2132  
  2133  
  2134  --
  2135  -- Name: FUNCTION email(); Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2136  --
  2137  
  2138  GRANT ALL ON FUNCTION auth.email() TO dashboard_user;
  2139  
  2140  
  2141  --
  2142  -- Name: FUNCTION jwt(); Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2143  --
  2144  
  2145  GRANT ALL ON FUNCTION auth.jwt() TO postgres;
  2146  GRANT ALL ON FUNCTION auth.jwt() TO dashboard_user;
  2147  
  2148  
  2149  --
  2150  -- Name: FUNCTION role(); Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2151  --
  2152  
  2153  GRANT ALL ON FUNCTION auth.role() TO dashboard_user;
  2154  
  2155  
  2156  --
  2157  -- Name: FUNCTION uid(); Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2158  --
  2159  
  2160  GRANT ALL ON FUNCTION auth.uid() TO dashboard_user;
  2161  
  2162  
  2163  --
  2164  -- Name: FUNCTION algorithm_sign(signables text, secret text, algorithm text); Type: ACL; Schema: extensions; Owner: postgres
  2165  --
  2166  
  2167  GRANT ALL ON FUNCTION extensions.algorithm_sign(signables text, secret text, algorithm text) TO dashboard_user;
  2168  
  2169  
  2170  --
  2171  -- Name: FUNCTION armor(bytea); Type: ACL; Schema: extensions; Owner: postgres
  2172  --
  2173  
  2174  GRANT ALL ON FUNCTION extensions.armor(bytea) TO dashboard_user;
  2175  
  2176  
  2177  --
  2178  -- Name: FUNCTION armor(bytea, text[], text[]); Type: ACL; Schema: extensions; Owner: postgres
  2179  --
  2180  
  2181  GRANT ALL ON FUNCTION extensions.armor(bytea, text[], text[]) TO dashboard_user;
  2182  
  2183  
  2184  --
  2185  -- Name: FUNCTION crypt(text, text); Type: ACL; Schema: extensions; Owner: postgres
  2186  --
  2187  
  2188  GRANT ALL ON FUNCTION extensions.crypt(text, text) TO dashboard_user;
  2189  
  2190  
  2191  --
  2192  -- Name: FUNCTION dearmor(text); Type: ACL; Schema: extensions; Owner: postgres
  2193  --
  2194  
  2195  GRANT ALL ON FUNCTION extensions.dearmor(text) TO dashboard_user;
  2196  
  2197  
  2198  --
  2199  -- Name: FUNCTION decrypt(bytea, bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2200  --
  2201  
  2202  GRANT ALL ON FUNCTION extensions.decrypt(bytea, bytea, text) TO dashboard_user;
  2203  
  2204  
  2205  --
  2206  -- Name: FUNCTION decrypt_iv(bytea, bytea, bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2207  --
  2208  
  2209  GRANT ALL ON FUNCTION extensions.decrypt_iv(bytea, bytea, bytea, text) TO dashboard_user;
  2210  
  2211  
  2212  --
  2213  -- Name: FUNCTION digest(bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2214  --
  2215  
  2216  GRANT ALL ON FUNCTION extensions.digest(bytea, text) TO dashboard_user;
  2217  
  2218  
  2219  --
  2220  -- Name: FUNCTION digest(text, text); Type: ACL; Schema: extensions; Owner: postgres
  2221  --
  2222  
  2223  GRANT ALL ON FUNCTION extensions.digest(text, text) TO dashboard_user;
  2224  
  2225  
  2226  --
  2227  -- Name: FUNCTION encrypt(bytea, bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2228  --
  2229  
  2230  GRANT ALL ON FUNCTION extensions.encrypt(bytea, bytea, text) TO dashboard_user;
  2231  
  2232  
  2233  --
  2234  -- Name: FUNCTION encrypt_iv(bytea, bytea, bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2235  --
  2236  
  2237  GRANT ALL ON FUNCTION extensions.encrypt_iv(bytea, bytea, bytea, text) TO dashboard_user;
  2238  
  2239  
  2240  --
  2241  -- Name: FUNCTION gen_random_bytes(integer); Type: ACL; Schema: extensions; Owner: postgres
  2242  --
  2243  
  2244  GRANT ALL ON FUNCTION extensions.gen_random_bytes(integer) TO dashboard_user;
  2245  
  2246  
  2247  --
  2248  -- Name: FUNCTION gen_random_uuid(); Type: ACL; Schema: extensions; Owner: postgres
  2249  --
  2250  
  2251  GRANT ALL ON FUNCTION extensions.gen_random_uuid() TO dashboard_user;
  2252  
  2253  
  2254  --
  2255  -- Name: FUNCTION gen_salt(text); Type: ACL; Schema: extensions; Owner: postgres
  2256  --
  2257  
  2258  GRANT ALL ON FUNCTION extensions.gen_salt(text) TO dashboard_user;
  2259  
  2260  
  2261  --
  2262  -- Name: FUNCTION gen_salt(text, integer); Type: ACL; Schema: extensions; Owner: postgres
  2263  --
  2264  
  2265  GRANT ALL ON FUNCTION extensions.gen_salt(text, integer) TO dashboard_user;
  2266  
  2267  
  2268  --
  2269  -- Name: FUNCTION grant_pg_cron_access(); Type: ACL; Schema: extensions; Owner: postgres
  2270  --
  2271  
  2272  GRANT ALL ON FUNCTION extensions.grant_pg_cron_access() TO dashboard_user;
  2273  
  2274  
  2275  --
  2276  -- Name: FUNCTION grant_pg_net_access(); Type: ACL; Schema: extensions; Owner: postgres
  2277  --
  2278  
  2279  GRANT ALL ON FUNCTION extensions.grant_pg_net_access() TO dashboard_user;
  2280  
  2281  
  2282  --
  2283  -- Name: FUNCTION hmac(bytea, bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2284  --
  2285  
  2286  GRANT ALL ON FUNCTION extensions.hmac(bytea, bytea, text) TO dashboard_user;
  2287  
  2288  
  2289  --
  2290  -- Name: FUNCTION hmac(text, text, text); Type: ACL; Schema: extensions; Owner: postgres
  2291  --
  2292  
  2293  GRANT ALL ON FUNCTION extensions.hmac(text, text, text) TO dashboard_user;
  2294  
  2295  
  2296  --
  2297  -- Name: FUNCTION pg_stat_statements(showtext boolean, OUT userid oid, OUT dbid oid, OUT toplevel boolean, OUT queryid bigint, OUT query text, OUT plans bigint, OUT total_plan_time double precision, OUT min_plan_time double precision, OUT max_plan_time double precision, OUT mean_plan_time double precision, OUT stddev_plan_time double precision, OUT calls bigint, OUT total_exec_time double precision, OUT min_exec_time double precision, OUT max_exec_time double precision, OUT mean_exec_time double precision, OUT stddev_exec_time double precision, OUT rows bigint, OUT shared_blks_hit bigint, OUT shared_blks_read bigint, OUT shared_blks_dirtied bigint, OUT shared_blks_written bigint, OUT local_blks_hit bigint, OUT local_blks_read bigint, OUT local_blks_dirtied bigint, OUT local_blks_written bigint, OUT temp_blks_read bigint, OUT temp_blks_written bigint, OUT blk_read_time double precision, OUT blk_write_time double precision, OUT wal_records bigint, OUT wal_fpi bigint, OUT wal_bytes numeric); Type: ACL; Schema: extensions; Owner: postgres
  2298  --
  2299  
  2300  GRANT ALL ON FUNCTION extensions.pg_stat_statements(showtext boolean, OUT userid oid, OUT dbid oid, OUT toplevel boolean, OUT queryid bigint, OUT query text, OUT plans bigint, OUT total_plan_time double precision, OUT min_plan_time double precision, OUT max_plan_time double precision, OUT mean_plan_time double precision, OUT stddev_plan_time double precision, OUT calls bigint, OUT total_exec_time double precision, OUT min_exec_time double precision, OUT max_exec_time double precision, OUT mean_exec_time double precision, OUT stddev_exec_time double precision, OUT rows bigint, OUT shared_blks_hit bigint, OUT shared_blks_read bigint, OUT shared_blks_dirtied bigint, OUT shared_blks_written bigint, OUT local_blks_hit bigint, OUT local_blks_read bigint, OUT local_blks_dirtied bigint, OUT local_blks_written bigint, OUT temp_blks_read bigint, OUT temp_blks_written bigint, OUT blk_read_time double precision, OUT blk_write_time double precision, OUT wal_records bigint, OUT wal_fpi bigint, OUT wal_bytes numeric) TO dashboard_user;
  2301  
  2302  
  2303  --
  2304  -- Name: FUNCTION pg_stat_statements_info(OUT dealloc bigint, OUT stats_reset timestamp with time zone); Type: ACL; Schema: extensions; Owner: postgres
  2305  --
  2306  
  2307  GRANT ALL ON FUNCTION extensions.pg_stat_statements_info(OUT dealloc bigint, OUT stats_reset timestamp with time zone) TO dashboard_user;
  2308  
  2309  
  2310  --
  2311  -- Name: FUNCTION pg_stat_statements_reset(userid oid, dbid oid, queryid bigint); Type: ACL; Schema: extensions; Owner: postgres
  2312  --
  2313  
  2314  GRANT ALL ON FUNCTION extensions.pg_stat_statements_reset(userid oid, dbid oid, queryid bigint) TO dashboard_user;
  2315  
  2316  
  2317  --
  2318  -- Name: FUNCTION pgp_armor_headers(text, OUT key text, OUT value text); Type: ACL; Schema: extensions; Owner: postgres
  2319  --
  2320  
  2321  GRANT ALL ON FUNCTION extensions.pgp_armor_headers(text, OUT key text, OUT value text) TO dashboard_user;
  2322  
  2323  
  2324  --
  2325  -- Name: FUNCTION pgp_key_id(bytea); Type: ACL; Schema: extensions; Owner: postgres
  2326  --
  2327  
  2328  GRANT ALL ON FUNCTION extensions.pgp_key_id(bytea) TO dashboard_user;
  2329  
  2330  
  2331  --
  2332  -- Name: FUNCTION pgp_pub_decrypt(bytea, bytea); Type: ACL; Schema: extensions; Owner: postgres
  2333  --
  2334  
  2335  GRANT ALL ON FUNCTION extensions.pgp_pub_decrypt(bytea, bytea) TO dashboard_user;
  2336  
  2337  
  2338  --
  2339  -- Name: FUNCTION pgp_pub_decrypt(bytea, bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2340  --
  2341  
  2342  GRANT ALL ON FUNCTION extensions.pgp_pub_decrypt(bytea, bytea, text) TO dashboard_user;
  2343  
  2344  
  2345  --
  2346  -- Name: FUNCTION pgp_pub_decrypt(bytea, bytea, text, text); Type: ACL; Schema: extensions; Owner: postgres
  2347  --
  2348  
  2349  GRANT ALL ON FUNCTION extensions.pgp_pub_decrypt(bytea, bytea, text, text) TO dashboard_user;
  2350  
  2351  
  2352  --
  2353  -- Name: FUNCTION pgp_pub_decrypt_bytea(bytea, bytea); Type: ACL; Schema: extensions; Owner: postgres
  2354  --
  2355  
  2356  GRANT ALL ON FUNCTION extensions.pgp_pub_decrypt_bytea(bytea, bytea) TO dashboard_user;
  2357  
  2358  
  2359  --
  2360  -- Name: FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2361  --
  2362  
  2363  GRANT ALL ON FUNCTION extensions.pgp_pub_decrypt_bytea(bytea, bytea, text) TO dashboard_user;
  2364  
  2365  
  2366  --
  2367  -- Name: FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text, text); Type: ACL; Schema: extensions; Owner: postgres
  2368  --
  2369  
  2370  GRANT ALL ON FUNCTION extensions.pgp_pub_decrypt_bytea(bytea, bytea, text, text) TO dashboard_user;
  2371  
  2372  
  2373  --
  2374  -- Name: FUNCTION pgp_pub_encrypt(text, bytea); Type: ACL; Schema: extensions; Owner: postgres
  2375  --
  2376  
  2377  GRANT ALL ON FUNCTION extensions.pgp_pub_encrypt(text, bytea) TO dashboard_user;
  2378  
  2379  
  2380  --
  2381  -- Name: FUNCTION pgp_pub_encrypt(text, bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2382  --
  2383  
  2384  GRANT ALL ON FUNCTION extensions.pgp_pub_encrypt(text, bytea, text) TO dashboard_user;
  2385  
  2386  
  2387  --
  2388  -- Name: FUNCTION pgp_pub_encrypt_bytea(bytea, bytea); Type: ACL; Schema: extensions; Owner: postgres
  2389  --
  2390  
  2391  GRANT ALL ON FUNCTION extensions.pgp_pub_encrypt_bytea(bytea, bytea) TO dashboard_user;
  2392  
  2393  
  2394  --
  2395  -- Name: FUNCTION pgp_pub_encrypt_bytea(bytea, bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2396  --
  2397  
  2398  GRANT ALL ON FUNCTION extensions.pgp_pub_encrypt_bytea(bytea, bytea, text) TO dashboard_user;
  2399  
  2400  
  2401  --
  2402  -- Name: FUNCTION pgp_sym_decrypt(bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2403  --
  2404  
  2405  GRANT ALL ON FUNCTION extensions.pgp_sym_decrypt(bytea, text) TO dashboard_user;
  2406  
  2407  
  2408  --
  2409  -- Name: FUNCTION pgp_sym_decrypt(bytea, text, text); Type: ACL; Schema: extensions; Owner: postgres
  2410  --
  2411  
  2412  GRANT ALL ON FUNCTION extensions.pgp_sym_decrypt(bytea, text, text) TO dashboard_user;
  2413  
  2414  
  2415  --
  2416  -- Name: FUNCTION pgp_sym_decrypt_bytea(bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2417  --
  2418  
  2419  GRANT ALL ON FUNCTION extensions.pgp_sym_decrypt_bytea(bytea, text) TO dashboard_user;
  2420  
  2421  
  2422  --
  2423  -- Name: FUNCTION pgp_sym_decrypt_bytea(bytea, text, text); Type: ACL; Schema: extensions; Owner: postgres
  2424  --
  2425  
  2426  GRANT ALL ON FUNCTION extensions.pgp_sym_decrypt_bytea(bytea, text, text) TO dashboard_user;
  2427  
  2428  
  2429  --
  2430  -- Name: FUNCTION pgp_sym_encrypt(text, text); Type: ACL; Schema: extensions; Owner: postgres
  2431  --
  2432  
  2433  GRANT ALL ON FUNCTION extensions.pgp_sym_encrypt(text, text) TO dashboard_user;
  2434  
  2435  
  2436  --
  2437  -- Name: FUNCTION pgp_sym_encrypt(text, text, text); Type: ACL; Schema: extensions; Owner: postgres
  2438  --
  2439  
  2440  GRANT ALL ON FUNCTION extensions.pgp_sym_encrypt(text, text, text) TO dashboard_user;
  2441  
  2442  
  2443  --
  2444  -- Name: FUNCTION pgp_sym_encrypt_bytea(bytea, text); Type: ACL; Schema: extensions; Owner: postgres
  2445  --
  2446  
  2447  GRANT ALL ON FUNCTION extensions.pgp_sym_encrypt_bytea(bytea, text) TO dashboard_user;
  2448  
  2449  
  2450  --
  2451  -- Name: FUNCTION pgp_sym_encrypt_bytea(bytea, text, text); Type: ACL; Schema: extensions; Owner: postgres
  2452  --
  2453  
  2454  GRANT ALL ON FUNCTION extensions.pgp_sym_encrypt_bytea(bytea, text, text) TO dashboard_user;
  2455  
  2456  
  2457  --
  2458  -- Name: FUNCTION sign(payload json, secret text, algorithm text); Type: ACL; Schema: extensions; Owner: postgres
  2459  --
  2460  
  2461  GRANT ALL ON FUNCTION extensions.sign(payload json, secret text, algorithm text) TO dashboard_user;
  2462  
  2463  
  2464  --
  2465  -- Name: FUNCTION try_cast_double(inp text); Type: ACL; Schema: extensions; Owner: postgres
  2466  --
  2467  
  2468  GRANT ALL ON FUNCTION extensions.try_cast_double(inp text) TO dashboard_user;
  2469  
  2470  
  2471  --
  2472  -- Name: FUNCTION url_decode(data text); Type: ACL; Schema: extensions; Owner: postgres
  2473  --
  2474  
  2475  GRANT ALL ON FUNCTION extensions.url_decode(data text) TO dashboard_user;
  2476  
  2477  
  2478  --
  2479  -- Name: FUNCTION url_encode(data bytea); Type: ACL; Schema: extensions; Owner: postgres
  2480  --
  2481  
  2482  GRANT ALL ON FUNCTION extensions.url_encode(data bytea) TO dashboard_user;
  2483  
  2484  
  2485  --
  2486  -- Name: FUNCTION uuid_generate_v1(); Type: ACL; Schema: extensions; Owner: postgres
  2487  --
  2488  
  2489  GRANT ALL ON FUNCTION extensions.uuid_generate_v1() TO dashboard_user;
  2490  
  2491  
  2492  --
  2493  -- Name: FUNCTION uuid_generate_v1mc(); Type: ACL; Schema: extensions; Owner: postgres
  2494  --
  2495  
  2496  GRANT ALL ON FUNCTION extensions.uuid_generate_v1mc() TO dashboard_user;
  2497  
  2498  
  2499  --
  2500  -- Name: FUNCTION uuid_generate_v3(namespace uuid, name text); Type: ACL; Schema: extensions; Owner: postgres
  2501  --
  2502  
  2503  GRANT ALL ON FUNCTION extensions.uuid_generate_v3(namespace uuid, name text) TO dashboard_user;
  2504  
  2505  
  2506  --
  2507  -- Name: FUNCTION uuid_generate_v4(); Type: ACL; Schema: extensions; Owner: postgres
  2508  --
  2509  
  2510  GRANT ALL ON FUNCTION extensions.uuid_generate_v4() TO dashboard_user;
  2511  
  2512  
  2513  --
  2514  -- Name: FUNCTION uuid_generate_v5(namespace uuid, name text); Type: ACL; Schema: extensions; Owner: postgres
  2515  --
  2516  
  2517  GRANT ALL ON FUNCTION extensions.uuid_generate_v5(namespace uuid, name text) TO dashboard_user;
  2518  
  2519  
  2520  --
  2521  -- Name: FUNCTION uuid_nil(); Type: ACL; Schema: extensions; Owner: postgres
  2522  --
  2523  
  2524  GRANT ALL ON FUNCTION extensions.uuid_nil() TO dashboard_user;
  2525  
  2526  
  2527  --
  2528  -- Name: FUNCTION uuid_ns_dns(); Type: ACL; Schema: extensions; Owner: postgres
  2529  --
  2530  
  2531  GRANT ALL ON FUNCTION extensions.uuid_ns_dns() TO dashboard_user;
  2532  
  2533  
  2534  --
  2535  -- Name: FUNCTION uuid_ns_oid(); Type: ACL; Schema: extensions; Owner: postgres
  2536  --
  2537  
  2538  GRANT ALL ON FUNCTION extensions.uuid_ns_oid() TO dashboard_user;
  2539  
  2540  
  2541  --
  2542  -- Name: FUNCTION uuid_ns_url(); Type: ACL; Schema: extensions; Owner: postgres
  2543  --
  2544  
  2545  GRANT ALL ON FUNCTION extensions.uuid_ns_url() TO dashboard_user;
  2546  
  2547  
  2548  --
  2549  -- Name: FUNCTION uuid_ns_x500(); Type: ACL; Schema: extensions; Owner: postgres
  2550  --
  2551  
  2552  GRANT ALL ON FUNCTION extensions.uuid_ns_x500() TO dashboard_user;
  2553  
  2554  
  2555  --
  2556  -- Name: FUNCTION verify(token text, secret text, algorithm text); Type: ACL; Schema: extensions; Owner: postgres
  2557  --
  2558  
  2559  GRANT ALL ON FUNCTION extensions.verify(token text, secret text, algorithm text) TO dashboard_user;
  2560  
  2561  
  2562  --
  2563  -- Name: FUNCTION comment_directive(comment_ text); Type: ACL; Schema: graphql; Owner: supabase_admin
  2564  --
  2565  
  2566  GRANT ALL ON FUNCTION graphql.comment_directive(comment_ text) TO postgres;
  2567  GRANT ALL ON FUNCTION graphql.comment_directive(comment_ text) TO anon;
  2568  GRANT ALL ON FUNCTION graphql.comment_directive(comment_ text) TO authenticated;
  2569  GRANT ALL ON FUNCTION graphql.comment_directive(comment_ text) TO service_role;
  2570  
  2571  
  2572  --
  2573  -- Name: FUNCTION exception(message text); Type: ACL; Schema: graphql; Owner: supabase_admin
  2574  --
  2575  
  2576  GRANT ALL ON FUNCTION graphql.exception(message text) TO postgres;
  2577  GRANT ALL ON FUNCTION graphql.exception(message text) TO anon;
  2578  GRANT ALL ON FUNCTION graphql.exception(message text) TO authenticated;
  2579  GRANT ALL ON FUNCTION graphql.exception(message text) TO service_role;
  2580  
  2581  
  2582  --
  2583  -- Name: FUNCTION get_schema_version(); Type: ACL; Schema: graphql; Owner: supabase_admin
  2584  --
  2585  
  2586  GRANT ALL ON FUNCTION graphql.get_schema_version() TO postgres;
  2587  GRANT ALL ON FUNCTION graphql.get_schema_version() TO anon;
  2588  GRANT ALL ON FUNCTION graphql.get_schema_version() TO authenticated;
  2589  GRANT ALL ON FUNCTION graphql.get_schema_version() TO service_role;
  2590  
  2591  
  2592  --
  2593  -- Name: FUNCTION increment_schema_version(); Type: ACL; Schema: graphql; Owner: supabase_admin
  2594  --
  2595  
  2596  GRANT ALL ON FUNCTION graphql.increment_schema_version() TO postgres;
  2597  GRANT ALL ON FUNCTION graphql.increment_schema_version() TO anon;
  2598  GRANT ALL ON FUNCTION graphql.increment_schema_version() TO authenticated;
  2599  GRANT ALL ON FUNCTION graphql.increment_schema_version() TO service_role;
  2600  
  2601  
  2602  --
  2603  -- Name: FUNCTION sequential_executor(prepared_statement_names text[]); Type: ACL; Schema: graphql; Owner: supabase_admin
  2604  --
  2605  
  2606  GRANT ALL ON FUNCTION graphql.sequential_executor(prepared_statement_names text[]) TO postgres;
  2607  GRANT ALL ON FUNCTION graphql.sequential_executor(prepared_statement_names text[]) TO anon;
  2608  GRANT ALL ON FUNCTION graphql.sequential_executor(prepared_statement_names text[]) TO authenticated;
  2609  GRANT ALL ON FUNCTION graphql.sequential_executor(prepared_statement_names text[]) TO service_role;
  2610  
  2611  
  2612  --
  2613  -- Name: FUNCTION graphql("operationName" text, query text, variables jsonb, extensions jsonb); Type: ACL; Schema: graphql_public; Owner: supabase_admin
  2614  --
  2615  
  2616  -- GRANT ALL ON FUNCTION graphql_public.graphql("operationName" text, query text, variables jsonb, extensions jsonb) TO postgres;
  2617  -- GRANT ALL ON FUNCTION graphql_public.graphql("operationName" text, query text, variables jsonb, extensions jsonb) TO anon;
  2618  -- GRANT ALL ON FUNCTION graphql_public.graphql("operationName" text, query text, variables jsonb, extensions jsonb) TO authenticated;
  2619  -- GRANT ALL ON FUNCTION graphql_public.graphql("operationName" text, query text, variables jsonb, extensions jsonb) TO service_role;
  2620  
  2621  
  2622  --
  2623  -- Name: FUNCTION get_auth(p_usename text); Type: ACL; Schema: pgbouncer; Owner: postgres
  2624  --
  2625  
  2626  REVOKE ALL ON FUNCTION pgbouncer.get_auth(p_usename text) FROM PUBLIC;
  2627  GRANT ALL ON FUNCTION pgbouncer.get_auth(p_usename text) TO pgbouncer;
  2628  
  2629  
  2630  --
  2631  -- Name: SEQUENCE key_key_id_seq; Type: ACL; Schema: pgsodium; Owner: postgres
  2632  --
  2633  
  2634  GRANT ALL ON SEQUENCE pgsodium.key_key_id_seq TO pgsodium_keyiduser;
  2635  
  2636  
  2637  --
  2638  -- Name: FUNCTION extension(name text); Type: ACL; Schema: storage; Owner: supabase_storage_admin
  2639  --
  2640  
  2641  GRANT ALL ON FUNCTION storage.extension(name text) TO anon;
  2642  GRANT ALL ON FUNCTION storage.extension(name text) TO authenticated;
  2643  GRANT ALL ON FUNCTION storage.extension(name text) TO service_role;
  2644  GRANT ALL ON FUNCTION storage.extension(name text) TO dashboard_user;
  2645  GRANT ALL ON FUNCTION storage.extension(name text) TO postgres;
  2646  
  2647  
  2648  --
  2649  -- Name: FUNCTION filename(name text); Type: ACL; Schema: storage; Owner: supabase_storage_admin
  2650  --
  2651  
  2652  GRANT ALL ON FUNCTION storage.filename(name text) TO anon;
  2653  GRANT ALL ON FUNCTION storage.filename(name text) TO authenticated;
  2654  GRANT ALL ON FUNCTION storage.filename(name text) TO service_role;
  2655  GRANT ALL ON FUNCTION storage.filename(name text) TO dashboard_user;
  2656  GRANT ALL ON FUNCTION storage.filename(name text) TO postgres;
  2657  
  2658  
  2659  --
  2660  -- Name: FUNCTION foldername(name text); Type: ACL; Schema: storage; Owner: supabase_storage_admin
  2661  --
  2662  
  2663  GRANT ALL ON FUNCTION storage.foldername(name text) TO anon;
  2664  GRANT ALL ON FUNCTION storage.foldername(name text) TO authenticated;
  2665  GRANT ALL ON FUNCTION storage.foldername(name text) TO service_role;
  2666  GRANT ALL ON FUNCTION storage.foldername(name text) TO dashboard_user;
  2667  GRANT ALL ON FUNCTION storage.foldername(name text) TO postgres;
  2668  
  2669  
  2670  --
  2671  -- Name: TABLE audit_log_entries; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2672  --
  2673  
  2674  GRANT ALL ON TABLE auth.audit_log_entries TO dashboard_user;
  2675  GRANT ALL ON TABLE auth.audit_log_entries TO postgres;
  2676  
  2677  
  2678  --
  2679  -- Name: TABLE identities; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2680  --
  2681  
  2682  GRANT ALL ON TABLE auth.identities TO postgres;
  2683  GRANT ALL ON TABLE auth.identities TO dashboard_user;
  2684  
  2685  
  2686  --
  2687  -- Name: TABLE instances; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2688  --
  2689  
  2690  GRANT ALL ON TABLE auth.instances TO dashboard_user;
  2691  GRANT ALL ON TABLE auth.instances TO postgres;
  2692  
  2693  
  2694  --
  2695  -- Name: TABLE mfa_amr_claims; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2696  --
  2697  
  2698  GRANT ALL ON TABLE auth.mfa_amr_claims TO postgres;
  2699  GRANT ALL ON TABLE auth.mfa_amr_claims TO dashboard_user;
  2700  
  2701  
  2702  --
  2703  -- Name: TABLE mfa_challenges; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2704  --
  2705  
  2706  GRANT ALL ON TABLE auth.mfa_challenges TO postgres;
  2707  GRANT ALL ON TABLE auth.mfa_challenges TO dashboard_user;
  2708  
  2709  
  2710  --
  2711  -- Name: TABLE mfa_factors; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2712  --
  2713  
  2714  GRANT ALL ON TABLE auth.mfa_factors TO postgres;
  2715  GRANT ALL ON TABLE auth.mfa_factors TO dashboard_user;
  2716  
  2717  
  2718  --
  2719  -- Name: TABLE refresh_tokens; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2720  --
  2721  
  2722  GRANT ALL ON TABLE auth.refresh_tokens TO dashboard_user;
  2723  GRANT ALL ON TABLE auth.refresh_tokens TO postgres;
  2724  
  2725  
  2726  --
  2727  -- Name: SEQUENCE refresh_tokens_id_seq; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2728  --
  2729  
  2730  GRANT ALL ON SEQUENCE auth.refresh_tokens_id_seq TO dashboard_user;
  2731  GRANT ALL ON SEQUENCE auth.refresh_tokens_id_seq TO postgres;
  2732  
  2733  
  2734  --
  2735  -- Name: TABLE saml_providers; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2736  --
  2737  
  2738  GRANT ALL ON TABLE auth.saml_providers TO postgres;
  2739  GRANT ALL ON TABLE auth.saml_providers TO dashboard_user;
  2740  
  2741  
  2742  --
  2743  -- Name: TABLE saml_relay_states; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2744  --
  2745  
  2746  GRANT ALL ON TABLE auth.saml_relay_states TO postgres;
  2747  GRANT ALL ON TABLE auth.saml_relay_states TO dashboard_user;
  2748  
  2749  
  2750  --
  2751  -- Name: TABLE schema_migrations; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2752  --
  2753  
  2754  GRANT ALL ON TABLE auth.schema_migrations TO dashboard_user;
  2755  GRANT ALL ON TABLE auth.schema_migrations TO postgres;
  2756  
  2757  
  2758  --
  2759  -- Name: TABLE sessions; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2760  --
  2761  
  2762  GRANT ALL ON TABLE auth.sessions TO postgres;
  2763  GRANT ALL ON TABLE auth.sessions TO dashboard_user;
  2764  
  2765  
  2766  --
  2767  -- Name: TABLE sso_domains; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2768  --
  2769  
  2770  GRANT ALL ON TABLE auth.sso_domains TO postgres;
  2771  GRANT ALL ON TABLE auth.sso_domains TO dashboard_user;
  2772  
  2773  
  2774  --
  2775  -- Name: TABLE sso_providers; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2776  --
  2777  
  2778  GRANT ALL ON TABLE auth.sso_providers TO postgres;
  2779  GRANT ALL ON TABLE auth.sso_providers TO dashboard_user;
  2780  
  2781  
  2782  --
  2783  -- Name: TABLE users; Type: ACL; Schema: auth; Owner: supabase_auth_admin
  2784  --
  2785  
  2786  GRANT ALL ON TABLE auth.users TO dashboard_user;
  2787  GRANT ALL ON TABLE auth.users TO postgres;
  2788  
  2789  
  2790  --
  2791  -- Name: TABLE pg_stat_statements; Type: ACL; Schema: extensions; Owner: postgres
  2792  --
  2793  
  2794  GRANT ALL ON TABLE extensions.pg_stat_statements TO dashboard_user;
  2795  
  2796  
  2797  --
  2798  -- Name: TABLE pg_stat_statements_info; Type: ACL; Schema: extensions; Owner: postgres
  2799  --
  2800  
  2801  GRANT ALL ON TABLE extensions.pg_stat_statements_info TO dashboard_user;
  2802  
  2803  
  2804  --
  2805  -- Name: SEQUENCE seq_schema_version; Type: ACL; Schema: graphql; Owner: supabase_admin
  2806  --
  2807  
  2808  GRANT ALL ON SEQUENCE graphql.seq_schema_version TO postgres;
  2809  GRANT ALL ON SEQUENCE graphql.seq_schema_version TO anon;
  2810  GRANT ALL ON SEQUENCE graphql.seq_schema_version TO authenticated;
  2811  GRANT ALL ON SEQUENCE graphql.seq_schema_version TO service_role;
  2812  
  2813  
  2814  --
  2815  -- Name: TABLE valid_key; Type: ACL; Schema: pgsodium; Owner: postgres
  2816  --
  2817  
  2818  GRANT ALL ON TABLE pgsodium.valid_key TO pgsodium_keyiduser;
  2819  
  2820  
  2821  --
  2822  -- Name: TABLE buckets; Type: ACL; Schema: storage; Owner: supabase_storage_admin
  2823  --
  2824  
  2825  GRANT ALL ON TABLE storage.buckets TO anon;
  2826  GRANT ALL ON TABLE storage.buckets TO authenticated;
  2827  GRANT ALL ON TABLE storage.buckets TO service_role;
  2828  GRANT ALL ON TABLE storage.buckets TO postgres;
  2829  
  2830  
  2831  --
  2832  -- Name: TABLE migrations; Type: ACL; Schema: storage; Owner: supabase_storage_admin
  2833  --
  2834  
  2835  GRANT ALL ON TABLE storage.migrations TO anon;
  2836  GRANT ALL ON TABLE storage.migrations TO authenticated;
  2837  GRANT ALL ON TABLE storage.migrations TO service_role;
  2838  GRANT ALL ON TABLE storage.migrations TO postgres;
  2839  
  2840  
  2841  --
  2842  -- Name: TABLE objects; Type: ACL; Schema: storage; Owner: supabase_storage_admin
  2843  --
  2844  
  2845  GRANT ALL ON TABLE storage.objects TO anon;
  2846  GRANT ALL ON TABLE storage.objects TO authenticated;
  2847  GRANT ALL ON TABLE storage.objects TO service_role;
  2848  GRANT ALL ON TABLE storage.objects TO postgres;
  2849  
  2850  
  2851  --
  2852  -- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: auth; Owner: supabase_auth_admin
  2853  --
  2854  
  2855  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_auth_admin IN SCHEMA auth GRANT ALL ON SEQUENCES  TO postgres;
  2856  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_auth_admin IN SCHEMA auth GRANT ALL ON SEQUENCES  TO dashboard_user;
  2857  
  2858  
  2859  --
  2860  -- Name: DEFAULT PRIVILEGES FOR FUNCTIONS; Type: DEFAULT ACL; Schema: auth; Owner: supabase_auth_admin
  2861  --
  2862  
  2863  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_auth_admin IN SCHEMA auth GRANT ALL ON FUNCTIONS  TO postgres;
  2864  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_auth_admin IN SCHEMA auth GRANT ALL ON FUNCTIONS  TO dashboard_user;
  2865  
  2866  
  2867  --
  2868  -- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: auth; Owner: supabase_auth_admin
  2869  --
  2870  
  2871  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_auth_admin IN SCHEMA auth GRANT ALL ON TABLES  TO postgres;
  2872  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_auth_admin IN SCHEMA auth GRANT ALL ON TABLES  TO dashboard_user;
  2873  
  2874  
  2875  --
  2876  -- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: graphql; Owner: supabase_admin
  2877  --
  2878  
  2879  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql GRANT ALL ON SEQUENCES  TO postgres;
  2880  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql GRANT ALL ON SEQUENCES  TO anon;
  2881  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql GRANT ALL ON SEQUENCES  TO authenticated;
  2882  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql GRANT ALL ON SEQUENCES  TO service_role;
  2883  
  2884  
  2885  --
  2886  -- Name: DEFAULT PRIVILEGES FOR FUNCTIONS; Type: DEFAULT ACL; Schema: graphql; Owner: supabase_admin
  2887  --
  2888  
  2889  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql GRANT ALL ON FUNCTIONS  TO postgres;
  2890  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql GRANT ALL ON FUNCTIONS  TO anon;
  2891  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql GRANT ALL ON FUNCTIONS  TO authenticated;
  2892  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql GRANT ALL ON FUNCTIONS  TO service_role;
  2893  
  2894  
  2895  --
  2896  -- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: graphql; Owner: supabase_admin
  2897  --
  2898  
  2899  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql GRANT ALL ON TABLES  TO postgres;
  2900  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql GRANT ALL ON TABLES  TO anon;
  2901  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql GRANT ALL ON TABLES  TO authenticated;
  2902  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql GRANT ALL ON TABLES  TO service_role;
  2903  
  2904  
  2905  --
  2906  -- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: graphql_public; Owner: supabase_admin
  2907  --
  2908  
  2909  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql_public GRANT ALL ON SEQUENCES  TO postgres;
  2910  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql_public GRANT ALL ON SEQUENCES  TO anon;
  2911  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql_public GRANT ALL ON SEQUENCES  TO authenticated;
  2912  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql_public GRANT ALL ON SEQUENCES  TO service_role;
  2913  
  2914  
  2915  --
  2916  -- Name: DEFAULT PRIVILEGES FOR FUNCTIONS; Type: DEFAULT ACL; Schema: graphql_public; Owner: supabase_admin
  2917  --
  2918  
  2919  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql_public GRANT ALL ON FUNCTIONS  TO postgres;
  2920  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql_public GRANT ALL ON FUNCTIONS  TO anon;
  2921  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql_public GRANT ALL ON FUNCTIONS  TO authenticated;
  2922  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql_public GRANT ALL ON FUNCTIONS  TO service_role;
  2923  
  2924  
  2925  --
  2926  -- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: graphql_public; Owner: supabase_admin
  2927  --
  2928  
  2929  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql_public GRANT ALL ON TABLES  TO postgres;
  2930  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql_public GRANT ALL ON TABLES  TO anon;
  2931  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql_public GRANT ALL ON TABLES  TO authenticated;
  2932  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA graphql_public GRANT ALL ON TABLES  TO service_role;
  2933  
  2934  
  2935  --
  2936  -- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: pgsodium; Owner: postgres
  2937  --
  2938  
  2939  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA pgsodium GRANT ALL ON SEQUENCES  TO pgsodium_keyiduser;
  2940  
  2941  
  2942  --
  2943  -- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: pgsodium; Owner: postgres
  2944  --
  2945  
  2946  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA pgsodium GRANT ALL ON TABLES  TO pgsodium_keyiduser;
  2947  
  2948  
  2949  --
  2950  -- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: public; Owner: postgres
  2951  --
  2952  
  2953  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES  TO postgres;
  2954  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES  TO anon;
  2955  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES  TO authenticated;
  2956  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON SEQUENCES  TO service_role;
  2957  
  2958  
  2959  --
  2960  -- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: public; Owner: supabase_admin
  2961  --
  2962  
  2963  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES  TO postgres;
  2964  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES  TO anon;
  2965  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES  TO authenticated;
  2966  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON SEQUENCES  TO service_role;
  2967  
  2968  
  2969  --
  2970  -- Name: DEFAULT PRIVILEGES FOR FUNCTIONS; Type: DEFAULT ACL; Schema: public; Owner: postgres
  2971  --
  2972  
  2973  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS  TO postgres;
  2974  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS  TO anon;
  2975  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS  TO authenticated;
  2976  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON FUNCTIONS  TO service_role;
  2977  
  2978  
  2979  --
  2980  -- Name: DEFAULT PRIVILEGES FOR FUNCTIONS; Type: DEFAULT ACL; Schema: public; Owner: supabase_admin
  2981  --
  2982  
  2983  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS  TO postgres;
  2984  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS  TO anon;
  2985  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS  TO authenticated;
  2986  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON FUNCTIONS  TO service_role;
  2987  
  2988  
  2989  --
  2990  -- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: public; Owner: postgres
  2991  --
  2992  
  2993  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES  TO postgres;
  2994  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES  TO anon;
  2995  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES  TO authenticated;
  2996  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT ALL ON TABLES  TO service_role;
  2997  
  2998  
  2999  --
  3000  -- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: public; Owner: supabase_admin
  3001  --
  3002  
  3003  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES  TO postgres;
  3004  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES  TO anon;
  3005  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES  TO authenticated;
  3006  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA public GRANT ALL ON TABLES  TO service_role;
  3007  
  3008  
  3009  --
  3010  -- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: realtime; Owner: supabase_admin
  3011  --
  3012  
  3013  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA realtime GRANT ALL ON SEQUENCES  TO postgres;
  3014  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA realtime GRANT ALL ON SEQUENCES  TO dashboard_user;
  3015  
  3016  
  3017  --
  3018  -- Name: DEFAULT PRIVILEGES FOR FUNCTIONS; Type: DEFAULT ACL; Schema: realtime; Owner: supabase_admin
  3019  --
  3020  
  3021  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA realtime GRANT ALL ON FUNCTIONS  TO postgres;
  3022  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA realtime GRANT ALL ON FUNCTIONS  TO dashboard_user;
  3023  
  3024  
  3025  --
  3026  -- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: realtime; Owner: supabase_admin
  3027  --
  3028  
  3029  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA realtime GRANT ALL ON TABLES  TO postgres;
  3030  ALTER DEFAULT PRIVILEGES FOR ROLE supabase_admin IN SCHEMA realtime GRANT ALL ON TABLES  TO dashboard_user;
  3031  
  3032  
  3033  --
  3034  -- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: storage; Owner: postgres
  3035  --
  3036  
  3037  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA storage GRANT ALL ON SEQUENCES  TO postgres;
  3038  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA storage GRANT ALL ON SEQUENCES  TO anon;
  3039  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA storage GRANT ALL ON SEQUENCES  TO authenticated;
  3040  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA storage GRANT ALL ON SEQUENCES  TO service_role;
  3041  
  3042  
  3043  --
  3044  -- Name: DEFAULT PRIVILEGES FOR FUNCTIONS; Type: DEFAULT ACL; Schema: storage; Owner: postgres
  3045  --
  3046  
  3047  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA storage GRANT ALL ON FUNCTIONS  TO postgres;
  3048  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA storage GRANT ALL ON FUNCTIONS  TO anon;
  3049  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA storage GRANT ALL ON FUNCTIONS  TO authenticated;
  3050  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA storage GRANT ALL ON FUNCTIONS  TO service_role;
  3051  
  3052  
  3053  --
  3054  -- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: storage; Owner: postgres
  3055  --
  3056  
  3057  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA storage GRANT ALL ON TABLES  TO postgres;
  3058  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA storage GRANT ALL ON TABLES  TO anon;
  3059  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA storage GRANT ALL ON TABLES  TO authenticated;
  3060  ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA storage GRANT ALL ON TABLES  TO service_role;
  3061  
  3062  
  3063  --
  3064  -- Name: issue_graphql_placeholder; Type: EVENT TRIGGER; Schema: -; Owner: supabase_admin
  3065  --
  3066  
  3067  CREATE EVENT TRIGGER issue_graphql_placeholder ON sql_drop
  3068           WHEN TAG IN ('DROP EXTENSION')
  3069     EXECUTE FUNCTION extensions.set_graphql_placeholder();
  3070  
  3071  
  3072  ALTER EVENT TRIGGER issue_graphql_placeholder OWNER TO supabase_admin;
  3073  
  3074  --
  3075  -- Name: issue_pg_cron_access; Type: EVENT TRIGGER; Schema: -; Owner: postgres
  3076  --
  3077  
  3078  CREATE EVENT TRIGGER issue_pg_cron_access ON ddl_command_end
  3079           WHEN TAG IN ('CREATE SCHEMA')
  3080     EXECUTE FUNCTION extensions.grant_pg_cron_access();
  3081  
  3082  
  3083  ALTER EVENT TRIGGER issue_pg_cron_access OWNER TO postgres;
  3084  
  3085  --
  3086  -- Name: issue_pg_graphql_access; Type: EVENT TRIGGER; Schema: -; Owner: supabase_admin
  3087  --
  3088  
  3089  CREATE EVENT TRIGGER issue_pg_graphql_access ON ddl_command_end
  3090           WHEN TAG IN ('CREATE FUNCTION')
  3091     EXECUTE FUNCTION extensions.grant_pg_graphql_access();
  3092  
  3093  
  3094  ALTER EVENT TRIGGER issue_pg_graphql_access OWNER TO supabase_admin;
  3095  
  3096  --
  3097  -- Name: issue_pg_net_access; Type: EVENT TRIGGER; Schema: -; Owner: postgres
  3098  --
  3099  
  3100  CREATE EVENT TRIGGER issue_pg_net_access ON ddl_command_end
  3101           WHEN TAG IN ('CREATE EXTENSION')
  3102     EXECUTE FUNCTION extensions.grant_pg_net_access();
  3103  
  3104  
  3105  ALTER EVENT TRIGGER issue_pg_net_access OWNER TO postgres;
  3106  
  3107  --
  3108  -- Name: pgrst_ddl_watch; Type: EVENT TRIGGER; Schema: -; Owner: supabase_admin
  3109  --
  3110  
  3111  CREATE EVENT TRIGGER pgrst_ddl_watch ON ddl_command_end
  3112     EXECUTE FUNCTION extensions.pgrst_ddl_watch();
  3113  
  3114  
  3115  ALTER EVENT TRIGGER pgrst_ddl_watch OWNER TO supabase_admin;
  3116  
  3117  --
  3118  -- Name: pgrst_drop_watch; Type: EVENT TRIGGER; Schema: -; Owner: supabase_admin
  3119  --
  3120  
  3121  CREATE EVENT TRIGGER pgrst_drop_watch ON sql_drop
  3122     EXECUTE FUNCTION extensions.pgrst_drop_watch();
  3123  
  3124  
  3125  ALTER EVENT TRIGGER pgrst_drop_watch OWNER TO supabase_admin;
  3126  
  3127  --
  3128  -- PostgreSQL database dump complete
  3129  --
  3130  
  3131  DROP EXTENSION pg_graphql; CREATE EXTENSION pg_graphql WITH SCHEMA graphql;
  3132  RESET ALL;