WARNING:  database "postgres" has a collation version mismatch
DETAIL:  The database was created using collation version 153.121, but the operating system provides version 153.128.
HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE postgres REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
--
-- PostgreSQL database cluster dump
--

\restrict BMuus0CoBd9xhVvciIihuDeQoTSf9aYSDesEdeWOwEp7M7J8YcfhORd89NaG2wc

SET default_transaction_read_only = off;

SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;

--
-- Roles
--

CREATE ROLE anon;
ALTER ROLE anon WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOLOGIN NOREPLICATION NOBYPASSRLS;
CREATE ROLE authenticated;
ALTER ROLE authenticated WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOLOGIN NOREPLICATION NOBYPASSRLS;
CREATE ROLE authenticator;
ALTER ROLE authenticator WITH NOSUPERUSER NOINHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS PASSWORD 'SCRAM-SHA-256$4096:GoKC5DDygUPHIKd+tbyNVQ==$dn2htXOLEsD5w47Sc9DIyFIhCErd67825ozbMZM9Pz8=:MIU/YF3aCY4/xnDjbrU9XFpHQR05VkWMJOzfBbjKTwM=';
CREATE ROLE dashboard_user;
ALTER ROLE dashboard_user WITH NOSUPERUSER INHERIT CREATEROLE CREATEDB NOLOGIN REPLICATION NOBYPASSRLS;
CREATE ROLE pgbouncer;
ALTER ROLE pgbouncer WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS PASSWORD 'SCRAM-SHA-256$4096:lW0k+b45o91CjD6arZPf+Q==$WmqwEis5VXWuF1bkVK513npSNYztsOzlAAgfvhFYOZ8=:in5aJG1R0HpNkDrWdo/ea4/PsQPC38EVIe7CCs7MQdU=';
CREATE ROLE postgres;
ALTER ROLE postgres WITH NOSUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION BYPASSRLS PASSWORD 'SCRAM-SHA-256$4096:nJ4BcCA/qSp76U9pbHIOMA==$X2joXBdRmA4kECaHXsEvHwGmq2/WdKkOWcMLfik2GCs=:6arIqZHPZJ7EqG40QliBfWMiEbAOk8g9+MbrguVIafw=';
CREATE ROLE service_role;
ALTER ROLE service_role WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOLOGIN NOREPLICATION BYPASSRLS;
CREATE ROLE supabase_admin;
ALTER ROLE supabase_admin WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION BYPASSRLS PASSWORD 'SCRAM-SHA-256$4096:iRfVXaWqrvbm9N0Uw3Ov1Q==$5sCY3zgjz/VuJ5jVZeJD5FPj16pwIw8o1i3OXVW2YI8=:q4NX5iLQp5m1nxUgj5GeorRvZI33KpbBfkd+/nUWm3o=';
CREATE ROLE supabase_auth_admin;
ALTER ROLE supabase_auth_admin WITH NOSUPERUSER NOINHERIT CREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS PASSWORD 'SCRAM-SHA-256$4096:hvj0e1E+TYrns03B58+16g==$L/YumPP5afncPAHgYZFHak6G4FK4hBKu+4eBUALa/QI=:7+H0VV/YN3PLWUFsg9M2hEt59ocvy9ZRX/0Zr99Gr6Y=';
CREATE ROLE supabase_etl_admin;
ALTER ROLE supabase_etl_admin WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN REPLICATION BYPASSRLS;
CREATE ROLE supabase_functions_admin;
ALTER ROLE supabase_functions_admin WITH NOSUPERUSER NOINHERIT CREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS;
CREATE ROLE supabase_read_only_user;
ALTER ROLE supabase_read_only_user WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION BYPASSRLS PASSWORD 'SCRAM-SHA-256$4096:MtXuHQWkV+uuL1B84dE+NA==$6ROcTEcX3Z6dCPd6XEP652a68cI0dW/u/2WTCD0utH8=:vqTEyV2Ff0ZFz0+rys2NWeyqXbfKdadPcTBJcuJg5IQ=';
CREATE ROLE supabase_realtime_admin;
ALTER ROLE supabase_realtime_admin WITH NOSUPERUSER NOINHERIT NOCREATEROLE NOCREATEDB NOLOGIN NOREPLICATION NOBYPASSRLS;
CREATE ROLE supabase_replication_admin;
ALTER ROLE supabase_replication_admin WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN REPLICATION NOBYPASSRLS PASSWORD 'SCRAM-SHA-256$4096:dc9uCOBEel67G2CYOjisHA==$v518RDZqn7MSn3P0maVO1I3mhxcvontC/yjRDJf6wvc=:0VchzV0v9cCXgMf2qkkvEoFd8p+UD/hfKcJyZI+uCTY=';
CREATE ROLE supabase_storage_admin;
ALTER ROLE supabase_storage_admin WITH NOSUPERUSER NOINHERIT CREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS PASSWORD 'SCRAM-SHA-256$4096:PR8oIP7KtmO8q7Uf9ZJ0Dw==$i4aztgWg4m57bCyA8mNv4ycCkfMwRWW+xr6KJgwCi4s=:D078uNacMMoW3v7zqZ2jZr60fyqUEtta5AN5oBeLgLo=';
CREATE ROLE supabase_superuser;
ALTER ROLE supabase_superuser WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOLOGIN NOREPLICATION NOBYPASSRLS;

--
-- User Configurations
--

--
-- User Config "anon"
--

ALTER ROLE anon SET statement_timeout TO '3s';

--
-- User Config "authenticated"
--

ALTER ROLE authenticated SET statement_timeout TO '8s';

--
-- User Config "authenticator"
--

ALTER ROLE authenticator SET session_preload_libraries TO 'safeupdate';
ALTER ROLE authenticator SET statement_timeout TO '8s';
ALTER ROLE authenticator SET lock_timeout TO '8s';

--
-- User Config "postgres"
--

ALTER ROLE postgres SET search_path TO E'\\$user', 'public', 'extensions';

--
-- User Config "supabase_admin"
--

ALTER ROLE supabase_admin SET search_path TO E'\\$user', 'public', 'auth', 'extensions';
ALTER ROLE supabase_admin SET log_statement TO 'none';

--
-- User Config "supabase_auth_admin"
--

ALTER ROLE supabase_auth_admin SET search_path TO 'auth';
ALTER ROLE supabase_auth_admin SET idle_in_transaction_session_timeout TO '60000';
ALTER ROLE supabase_auth_admin SET log_statement TO 'none';

--
-- User Config "supabase_functions_admin"
--

ALTER ROLE supabase_functions_admin SET search_path TO 'supabase_functions';

--
-- User Config "supabase_read_only_user"
--

ALTER ROLE supabase_read_only_user SET default_transaction_read_only TO 'on';

--
-- User Config "supabase_storage_admin"
--

ALTER ROLE supabase_storage_admin SET search_path TO 'storage';
ALTER ROLE supabase_storage_admin SET log_statement TO 'none';


--
-- Role memberships
--

GRANT anon TO authenticator WITH INHERIT FALSE GRANTED BY supabase_admin;
GRANT anon TO postgres WITH ADMIN OPTION, INHERIT TRUE GRANTED BY supabase_admin;
GRANT authenticated TO authenticator WITH INHERIT FALSE GRANTED BY supabase_admin;
GRANT authenticated TO postgres WITH ADMIN OPTION, INHERIT TRUE GRANTED BY supabase_admin;
GRANT authenticator TO postgres WITH ADMIN OPTION, INHERIT TRUE GRANTED BY supabase_admin;
GRANT authenticator TO supabase_storage_admin WITH INHERIT FALSE GRANTED BY supabase_admin;
GRANT pg_create_subscription TO postgres WITH ADMIN OPTION, INHERIT TRUE GRANTED BY supabase_admin;
GRANT pg_monitor TO postgres WITH ADMIN OPTION, INHERIT TRUE GRANTED BY supabase_admin;
GRANT pg_monitor TO supabase_etl_admin WITH INHERIT TRUE GRANTED BY supabase_admin;
GRANT pg_monitor TO supabase_read_only_user WITH INHERIT TRUE GRANTED BY supabase_admin;
GRANT pg_read_all_data TO postgres WITH ADMIN OPTION, INHERIT TRUE GRANTED BY supabase_admin;
GRANT pg_read_all_data TO supabase_etl_admin WITH INHERIT TRUE GRANTED BY supabase_admin;
GRANT pg_read_all_data TO supabase_read_only_user WITH INHERIT TRUE GRANTED BY supabase_admin;
GRANT pg_signal_backend TO postgres WITH ADMIN OPTION, INHERIT TRUE GRANTED BY supabase_admin;
GRANT service_role TO authenticator WITH INHERIT FALSE GRANTED BY supabase_admin;
GRANT service_role TO postgres WITH ADMIN OPTION, INHERIT TRUE GRANTED BY supabase_admin;
GRANT supabase_functions_admin TO postgres WITH INHERIT TRUE GRANTED BY supabase_admin;
GRANT supabase_realtime_admin TO postgres WITH INHERIT TRUE GRANTED BY supabase_admin;
GRANT supabase_superuser TO postgres WITH INHERIT TRUE GRANTED BY supabase_admin;
GRANT supabase_superuser TO supabase_etl_admin WITH INHERIT TRUE GRANTED BY supabase_admin;






\unrestrict BMuus0CoBd9xhVvciIihuDeQoTSf9aYSDesEdeWOwEp7M7J8YcfhORd89NaG2wc

--
-- Databases
--

--
-- Database "template1" dump
--

\connect template1

WARNING:  database "template1" has a collation version mismatch
DETAIL:  The database was created using collation version 153.121, but the operating system provides version 153.128.
HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE template1 REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
--
-- PostgreSQL database dump
--

\restrict BcGsX0h1DRyoYaeD1y0HIxg5K9Oj93TuZmOtLXCVU1iiRAOHzgCA6ABBbqno9uu

-- Dumped from database version 17.9 (Debian 17.9-1.pgdg13+1)
-- Dumped by pg_dump version 17.9 (Debian 17.9-1.pgdg13+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET transaction_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- PostgreSQL database dump complete
--

\unrestrict BcGsX0h1DRyoYaeD1y0HIxg5K9Oj93TuZmOtLXCVU1iiRAOHzgCA6ABBbqno9uu

--
-- Database "_supabase" dump
--

WARNING:  database "_supabase" has a collation version mismatch
DETAIL:  The database was created using collation version 153.121, but the operating system provides version 153.128.
HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE _supabase REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
--
-- PostgreSQL database dump
--

\restrict xJvMXxzqaJ7UXK2ez6Yd3dzFaJX1iKFj7P929Vy8xknfmaurud28HYPwvrFgjjM

-- Dumped from database version 17.9 (Debian 17.9-1.pgdg13+1)
-- Dumped by pg_dump version 17.9 (Debian 17.9-1.pgdg13+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET transaction_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- Name: _supabase; Type: DATABASE; Schema: -; Owner: postgres
--

CREATE DATABASE _supabase WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = icu LOCALE = 'en_US.UTF-8' ICU_LOCALE = 'en-US';


ALTER DATABASE _supabase OWNER TO postgres;

\unrestrict xJvMXxzqaJ7UXK2ez6Yd3dzFaJX1iKFj7P929Vy8xknfmaurud28HYPwvrFgjjM
\connect _supabase
\restrict xJvMXxzqaJ7UXK2ez6Yd3dzFaJX1iKFj7P929Vy8xknfmaurud28HYPwvrFgjjM

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET transaction_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- Name: _analytics; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA _analytics;


ALTER SCHEMA _analytics OWNER TO postgres;

--
-- Name: _supavisor; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA _supavisor;


ALTER SCHEMA _supavisor OWNER TO postgres;

SET default_tablespace = '';

SET default_table_access_method = heap;

--
-- Name: alert_queries; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.alert_queries (
    id bigint NOT NULL,
    name character varying(255),
    token uuid,
    query text,
    description text,
    language character varying(255),
    cron character varying(255),
    source_mapping jsonb,
    slack_hook_url character varying(255),
    webhook_notification_url character varying(255),
    user_id bigint,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL
);


ALTER TABLE _analytics.alert_queries OWNER TO supabase_admin;

--
-- Name: alert_queries_backends; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.alert_queries_backends (
    id bigint NOT NULL,
    alert_query_id bigint,
    backend_id bigint
);


ALTER TABLE _analytics.alert_queries_backends OWNER TO supabase_admin;

--
-- Name: alert_queries_backends_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.alert_queries_backends_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.alert_queries_backends_id_seq OWNER TO supabase_admin;

--
-- Name: alert_queries_backends_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.alert_queries_backends_id_seq OWNED BY _analytics.alert_queries_backends.id;


--
-- Name: alert_queries_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.alert_queries_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.alert_queries_id_seq OWNER TO supabase_admin;

--
-- Name: alert_queries_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.alert_queries_id_seq OWNED BY _analytics.alert_queries.id;


--
-- Name: backends; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.backends (
    id bigint NOT NULL,
    name character varying(255),
    description text,
    user_id bigint,
    type character varying(255),
    config jsonb,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL,
    token uuid NOT NULL,
    metadata jsonb,
    config_encrypted bytea,
    default_ingest boolean DEFAULT false
);


ALTER TABLE _analytics.backends OWNER TO supabase_admin;

--
-- Name: backends_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.backends_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.backends_id_seq OWNER TO supabase_admin;

--
-- Name: backends_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.backends_id_seq OWNED BY _analytics.backends.id;


--
-- Name: billing_accounts; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.billing_accounts (
    id bigint NOT NULL,
    latest_successful_stripe_session jsonb,
    stripe_customer character varying(255),
    user_id bigint,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL,
    stripe_subscriptions jsonb,
    stripe_invoices jsonb,
    "lifetime_plan?" boolean DEFAULT false,
    lifetime_plan_invoice character varying(255),
    default_payment_method character varying(255),
    custom_invoice_fields jsonb[] DEFAULT ARRAY[]::jsonb[],
    lifetime_plan boolean DEFAULT false NOT NULL
);


ALTER TABLE _analytics.billing_accounts OWNER TO supabase_admin;

--
-- Name: billing_accounts_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.billing_accounts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.billing_accounts_id_seq OWNER TO supabase_admin;

--
-- Name: billing_accounts_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.billing_accounts_id_seq OWNED BY _analytics.billing_accounts.id;


--
-- Name: billing_counts; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.billing_counts (
    id bigint NOT NULL,
    node character varying(255),
    count integer,
    user_id bigint,
    source_id bigint,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL
);


ALTER TABLE _analytics.billing_counts OWNER TO supabase_admin;

--
-- Name: billing_counts_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.billing_counts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.billing_counts_id_seq OWNER TO supabase_admin;

--
-- Name: billing_counts_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.billing_counts_id_seq OWNED BY _analytics.billing_counts.id;


--
-- Name: endpoint_queries; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.endpoint_queries (
    id bigint NOT NULL,
    name character varying(255),
    token uuid,
    query text,
    user_id bigint,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL,
    source_mapping jsonb DEFAULT '{}'::jsonb NOT NULL,
    sandboxable boolean DEFAULT false,
    cache_duration_seconds integer DEFAULT 3600,
    proactive_requerying_seconds integer DEFAULT 1800,
    max_limit integer DEFAULT 1000,
    enable_auth boolean DEFAULT false,
    language character varying(255) NOT NULL,
    description character varying(255),
    sandbox_query_id bigint,
    labels text,
    backend_id bigint,
    redact_pii boolean DEFAULT false NOT NULL
);


ALTER TABLE _analytics.endpoint_queries OWNER TO supabase_admin;

--
-- Name: endpoint_queries_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.endpoint_queries_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.endpoint_queries_id_seq OWNER TO supabase_admin;

--
-- Name: endpoint_queries_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.endpoint_queries_id_seq OWNED BY _analytics.endpoint_queries.id;


--
-- Name: log_events_29bf272f_963f_428c_92d6_9d23d82db2b9; Type: TABLE; Schema: _analytics; Owner: postgres
--

CREATE TABLE _analytics.log_events_29bf272f_963f_428c_92d6_9d23d82db2b9 (
    id text NOT NULL,
    body jsonb,
    event_message text,
    "timestamp" timestamp without time zone
);


ALTER TABLE _analytics.log_events_29bf272f_963f_428c_92d6_9d23d82db2b9 OWNER TO postgres;

--
-- Name: log_events_2e83f1e3_3749_45d2_9f79_ffac71f126b9; Type: TABLE; Schema: _analytics; Owner: postgres
--

CREATE TABLE _analytics.log_events_2e83f1e3_3749_45d2_9f79_ffac71f126b9 (
    id text NOT NULL,
    body jsonb,
    event_message text,
    "timestamp" timestamp without time zone
);


ALTER TABLE _analytics.log_events_2e83f1e3_3749_45d2_9f79_ffac71f126b9 OWNER TO postgres;

--
-- Name: log_events_4f78826b_0fb2_4bf5_87ae_651938059363; Type: TABLE; Schema: _analytics; Owner: postgres
--

CREATE TABLE _analytics.log_events_4f78826b_0fb2_4bf5_87ae_651938059363 (
    id text NOT NULL,
    body jsonb,
    event_message text,
    "timestamp" timestamp without time zone
);


ALTER TABLE _analytics.log_events_4f78826b_0fb2_4bf5_87ae_651938059363 OWNER TO postgres;

--
-- Name: log_events_5d610146_c53c_4ae2_8f07_b464282231c6; Type: TABLE; Schema: _analytics; Owner: postgres
--

CREATE TABLE _analytics.log_events_5d610146_c53c_4ae2_8f07_b464282231c6 (
    id text NOT NULL,
    body jsonb,
    event_message text,
    "timestamp" timestamp without time zone
);


ALTER TABLE _analytics.log_events_5d610146_c53c_4ae2_8f07_b464282231c6 OWNER TO postgres;

--
-- Name: log_events_648bd7d8_1db2_4fd2_ac66_8fb8cc3b6223; Type: TABLE; Schema: _analytics; Owner: postgres
--

CREATE TABLE _analytics.log_events_648bd7d8_1db2_4fd2_ac66_8fb8cc3b6223 (
    id text NOT NULL,
    body jsonb,
    event_message text,
    "timestamp" timestamp without time zone
);


ALTER TABLE _analytics.log_events_648bd7d8_1db2_4fd2_ac66_8fb8cc3b6223 OWNER TO postgres;

--
-- Name: log_events_6a23fe1a_f67a_4579_9307_a7fc4e02505f; Type: TABLE; Schema: _analytics; Owner: postgres
--

CREATE TABLE _analytics.log_events_6a23fe1a_f67a_4579_9307_a7fc4e02505f (
    id text NOT NULL,
    body jsonb,
    event_message text,
    "timestamp" timestamp without time zone
);


ALTER TABLE _analytics.log_events_6a23fe1a_f67a_4579_9307_a7fc4e02505f OWNER TO postgres;

--
-- Name: log_events_7b2a211d_733d_4cac_b6dd_aa13bbe48af1; Type: TABLE; Schema: _analytics; Owner: postgres
--

CREATE TABLE _analytics.log_events_7b2a211d_733d_4cac_b6dd_aa13bbe48af1 (
    id text NOT NULL,
    body jsonb,
    event_message text,
    "timestamp" timestamp without time zone
);


ALTER TABLE _analytics.log_events_7b2a211d_733d_4cac_b6dd_aa13bbe48af1 OWNER TO postgres;

--
-- Name: log_events_ebc6c601_12e9_4886_97c4_9f5a0e3cbde3; Type: TABLE; Schema: _analytics; Owner: postgres
--

CREATE TABLE _analytics.log_events_ebc6c601_12e9_4886_97c4_9f5a0e3cbde3 (
    id text NOT NULL,
    body jsonb,
    event_message text,
    "timestamp" timestamp without time zone
);


ALTER TABLE _analytics.log_events_ebc6c601_12e9_4886_97c4_9f5a0e3cbde3 OWNER TO postgres;

--
-- Name: log_events_ec5fd879_cdfc_46fd_ae8e_c7f8729d6e3e; Type: TABLE; Schema: _analytics; Owner: postgres
--

CREATE TABLE _analytics.log_events_ec5fd879_cdfc_46fd_ae8e_c7f8729d6e3e (
    id text NOT NULL,
    body jsonb,
    event_message text,
    "timestamp" timestamp without time zone
);


ALTER TABLE _analytics.log_events_ec5fd879_cdfc_46fd_ae8e_c7f8729d6e3e OWNER TO postgres;

--
-- Name: oauth_access_grants; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.oauth_access_grants (
    id bigint NOT NULL,
    resource_owner_id integer NOT NULL,
    application_id bigint,
    token character varying(255) NOT NULL,
    expires_in integer NOT NULL,
    redirect_uri text NOT NULL,
    revoked_at timestamp(0) without time zone,
    scopes character varying(255),
    inserted_at timestamp(0) without time zone NOT NULL
);


ALTER TABLE _analytics.oauth_access_grants OWNER TO supabase_admin;

--
-- Name: oauth_access_grants_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.oauth_access_grants_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.oauth_access_grants_id_seq OWNER TO supabase_admin;

--
-- Name: oauth_access_grants_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.oauth_access_grants_id_seq OWNED BY _analytics.oauth_access_grants.id;


--
-- Name: oauth_access_tokens; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.oauth_access_tokens (
    id bigint NOT NULL,
    application_id bigint,
    resource_owner_id integer,
    token character varying(255) NOT NULL,
    refresh_token character varying(255),
    expires_in integer,
    revoked_at timestamp(0) without time zone,
    scopes character varying(255),
    previous_refresh_token character varying(255) DEFAULT ''::character varying NOT NULL,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL,
    description text
);


ALTER TABLE _analytics.oauth_access_tokens OWNER TO supabase_admin;

--
-- Name: oauth_access_tokens_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.oauth_access_tokens_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.oauth_access_tokens_id_seq OWNER TO supabase_admin;

--
-- Name: oauth_access_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.oauth_access_tokens_id_seq OWNED BY _analytics.oauth_access_tokens.id;


--
-- Name: oauth_applications; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.oauth_applications (
    id bigint NOT NULL,
    owner_id integer NOT NULL,
    name character varying(255) NOT NULL,
    uid character varying(255) NOT NULL,
    secret character varying(255) DEFAULT ''::character varying NOT NULL,
    redirect_uri character varying(255) NOT NULL,
    scopes character varying(255) DEFAULT ''::character varying NOT NULL,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL
);


ALTER TABLE _analytics.oauth_applications OWNER TO supabase_admin;

--
-- Name: oauth_applications_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.oauth_applications_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.oauth_applications_id_seq OWNER TO supabase_admin;

--
-- Name: oauth_applications_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.oauth_applications_id_seq OWNED BY _analytics.oauth_applications.id;


--
-- Name: partner_users; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.partner_users (
    id bigint NOT NULL,
    partner_id bigint,
    user_id bigint,
    upgraded boolean DEFAULT false NOT NULL
);


ALTER TABLE _analytics.partner_users OWNER TO supabase_admin;

--
-- Name: partner_users_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.partner_users_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.partner_users_id_seq OWNER TO supabase_admin;

--
-- Name: partner_users_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.partner_users_id_seq OWNED BY _analytics.partner_users.id;


--
-- Name: partners; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.partners (
    id bigint NOT NULL,
    name bytea,
    token bytea
);


ALTER TABLE _analytics.partners OWNER TO supabase_admin;

--
-- Name: partners_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.partners_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.partners_id_seq OWNER TO supabase_admin;

--
-- Name: partners_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.partners_id_seq OWNED BY _analytics.partners.id;


--
-- Name: payment_methods; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.payment_methods (
    id bigint NOT NULL,
    stripe_id character varying(255),
    price_id character varying(255),
    last_four character varying(255),
    brand character varying(255),
    exp_year integer,
    exp_month integer,
    customer_id character varying(255),
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL
);


ALTER TABLE _analytics.payment_methods OWNER TO supabase_admin;

--
-- Name: payment_methods_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.payment_methods_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.payment_methods_id_seq OWNER TO supabase_admin;

--
-- Name: payment_methods_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.payment_methods_id_seq OWNED BY _analytics.payment_methods.id;


--
-- Name: plans; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.plans (
    id bigint NOT NULL,
    name character varying(255),
    stripe_id character varying(255),
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL,
    period character varying(255),
    price integer,
    limit_sources integer,
    limit_rate_limit integer,
    limit_alert_freq integer,
    limit_source_rate_limit integer,
    limit_saved_search_limit integer,
    limit_team_users_limit integer,
    limit_source_fields_limit integer,
    limit_source_ttl bigint DEFAULT 259200000,
    type character varying(255) DEFAULT 'standard'::character varying
);


ALTER TABLE _analytics.plans OWNER TO supabase_admin;

--
-- Name: plans_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.plans_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.plans_id_seq OWNER TO supabase_admin;

--
-- Name: plans_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.plans_id_seq OWNED BY _analytics.plans.id;


--
-- Name: rules; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.rules (
    id bigint NOT NULL,
    regex character varying(255),
    sink uuid,
    source_id bigint NOT NULL,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL,
    regex_struct bytea,
    lql_string text DEFAULT ''::text NOT NULL,
    lql_filters bytea DEFAULT '\x836a'::bytea NOT NULL,
    backend_id bigint,
    token uuid DEFAULT gen_random_uuid()
);

ALTER TABLE ONLY _analytics.rules REPLICA IDENTITY FULL;


ALTER TABLE _analytics.rules OWNER TO supabase_admin;

--
-- Name: rules_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.rules_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.rules_id_seq OWNER TO supabase_admin;

--
-- Name: rules_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.rules_id_seq OWNED BY _analytics.rules.id;


--
-- Name: saved_search_counters; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.saved_search_counters (
    id bigint NOT NULL,
    "timestamp" timestamp without time zone NOT NULL,
    saved_search_id bigint NOT NULL,
    granularity text DEFAULT 'day'::text NOT NULL,
    non_tailing_count integer,
    tailing_count integer
);


ALTER TABLE _analytics.saved_search_counters OWNER TO supabase_admin;

--
-- Name: saved_search_counters_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.saved_search_counters_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.saved_search_counters_id_seq OWNER TO supabase_admin;

--
-- Name: saved_search_counters_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.saved_search_counters_id_seq OWNED BY _analytics.saved_search_counters.id;


--
-- Name: saved_searches; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.saved_searches (
    id bigint NOT NULL,
    querystring text,
    source_id bigint,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL,
    saved_by_user boolean,
    lql_filters jsonb,
    lql_charts jsonb,
    "tailing?" boolean DEFAULT true NOT NULL,
    tailing boolean DEFAULT true NOT NULL
);


ALTER TABLE _analytics.saved_searches OWNER TO supabase_admin;

--
-- Name: saved_searches_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.saved_searches_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.saved_searches_id_seq OWNER TO supabase_admin;

--
-- Name: saved_searches_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.saved_searches_id_seq OWNED BY _analytics.saved_searches.id;


--
-- Name: schema_migrations; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.schema_migrations (
    version bigint NOT NULL,
    inserted_at timestamp(0) without time zone
);


ALTER TABLE _analytics.schema_migrations OWNER TO supabase_admin;

--
-- Name: source_backends; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.source_backends (
    id bigint NOT NULL,
    source_id bigint,
    type character varying(255),
    config jsonb,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL
);


ALTER TABLE _analytics.source_backends OWNER TO supabase_admin;

--
-- Name: source_backends_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.source_backends_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.source_backends_id_seq OWNER TO supabase_admin;

--
-- Name: source_backends_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.source_backends_id_seq OWNED BY _analytics.source_backends.id;


--
-- Name: source_schemas; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.source_schemas (
    id bigint NOT NULL,
    bigquery_schema bytea,
    source_id bigint,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL,
    schema_flat_map bytea
);


ALTER TABLE _analytics.source_schemas OWNER TO supabase_admin;

--
-- Name: source_schemas_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.source_schemas_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.source_schemas_id_seq OWNER TO supabase_admin;

--
-- Name: source_schemas_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.source_schemas_id_seq OWNED BY _analytics.source_schemas.id;


--
-- Name: sources; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.sources (
    id bigint NOT NULL,
    name character varying(255),
    token uuid NOT NULL,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL,
    user_id integer NOT NULL,
    public_token character varying(255),
    favorite boolean DEFAULT false NOT NULL,
    bigquery_table_ttl integer,
    api_quota integer DEFAULT 5 NOT NULL,
    webhook_notification_url character varying(255),
    slack_hook_url character varying(255),
    notifications jsonb DEFAULT '{"team_user_ids_for_sms": [], "team_user_ids_for_email": [], "user_text_notifications": false, "user_email_notifications": false, "other_email_notifications": null, "team_user_ids_for_schema_updates": [], "user_schema_update_notifications": true}'::jsonb NOT NULL,
    custom_event_message_keys character varying(255),
    log_events_updated_at timestamp(0) without time zone,
    bigquery_schema bytea,
    notifications_every integer DEFAULT 14400000,
    bq_table_partition_type text,
    lock_schema boolean DEFAULT false,
    validate_schema boolean DEFAULT true,
    drop_lql_filters bytea DEFAULT '\x836a'::bytea NOT NULL,
    drop_lql_string character varying(255),
    v2_pipeline boolean DEFAULT false,
    suggested_keys character varying(255) DEFAULT ''::character varying,
    service_name character varying(255),
    transform_copy_fields character varying(255),
    disable_tailing boolean DEFAULT false,
    bq_storage_write_api boolean DEFAULT false,
    bigquery_clustering_fields character varying(255),
    default_ingest_backend_enabled boolean DEFAULT false,
    system_source boolean DEFAULT false,
    system_source_type character varying(255),
    labels text
);

ALTER TABLE ONLY _analytics.sources REPLICA IDENTITY FULL;


ALTER TABLE _analytics.sources OWNER TO supabase_admin;

--
-- Name: sources_backends; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.sources_backends (
    id bigint NOT NULL,
    backend_id bigint,
    source_id bigint
);


ALTER TABLE _analytics.sources_backends OWNER TO supabase_admin;

--
-- Name: sources_backends_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.sources_backends_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.sources_backends_id_seq OWNER TO supabase_admin;

--
-- Name: sources_backends_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.sources_backends_id_seq OWNED BY _analytics.sources_backends.id;


--
-- Name: sources_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.sources_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.sources_id_seq OWNER TO supabase_admin;

--
-- Name: sources_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.sources_id_seq OWNED BY _analytics.sources.id;


--
-- Name: system_metrics; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.system_metrics (
    id bigint NOT NULL,
    all_logs_logged bigint,
    node character varying(255),
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL
);


ALTER TABLE _analytics.system_metrics OWNER TO supabase_admin;

--
-- Name: system_metrics_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.system_metrics_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.system_metrics_id_seq OWNER TO supabase_admin;

--
-- Name: system_metrics_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.system_metrics_id_seq OWNED BY _analytics.system_metrics.id;


--
-- Name: team_users; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.team_users (
    id bigint NOT NULL,
    email character varying(255),
    token text,
    provider character varying(255),
    email_preferred character varying(255),
    name character varying(255),
    image character varying(255),
    email_me_product boolean DEFAULT false NOT NULL,
    phone character varying(255),
    valid_google_account boolean DEFAULT false NOT NULL,
    provider_uid text,
    team_id bigint,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL,
    preferences jsonb
);


ALTER TABLE _analytics.team_users OWNER TO supabase_admin;

--
-- Name: team_users_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.team_users_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.team_users_id_seq OWNER TO supabase_admin;

--
-- Name: team_users_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.team_users_id_seq OWNED BY _analytics.team_users.id;


--
-- Name: teams; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.teams (
    id bigint NOT NULL,
    name character varying(255),
    user_id bigint,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL,
    token character varying(255) DEFAULT gen_random_uuid()
);


ALTER TABLE _analytics.teams OWNER TO supabase_admin;

--
-- Name: teams_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.teams_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.teams_id_seq OWNER TO supabase_admin;

--
-- Name: teams_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.teams_id_seq OWNED BY _analytics.teams.id;


--
-- Name: users; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.users (
    id bigint NOT NULL,
    email character varying(255),
    provider character varying(255) NOT NULL,
    token text NOT NULL,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL,
    api_key character varying(255) NOT NULL,
    old_api_key character varying(255),
    email_preferred character varying(255),
    name character varying(255),
    image character varying(255),
    email_me_product boolean DEFAULT true NOT NULL,
    admin boolean DEFAULT false NOT NULL,
    phone character varying(255),
    bigquery_project_id character varying(255),
    api_quota integer DEFAULT 125 NOT NULL,
    bigquery_dataset_location character varying(255),
    bigquery_dataset_id character varying(255),
    valid_google_account boolean,
    provider_uid text NOT NULL,
    company character varying(255),
    bigquery_udfs_hash character varying(255) DEFAULT ''::character varying NOT NULL,
    bigquery_processed_bytes_limit bigint DEFAULT '10000000000'::bigint NOT NULL,
    "billing_enabled?" boolean DEFAULT false NOT NULL,
    preferences jsonb,
    billing_enabled boolean DEFAULT false NOT NULL,
    endpoints_beta boolean DEFAULT false,
    metadata jsonb,
    partner_upgraded boolean DEFAULT false,
    partner_id bigint,
    bigquery_enable_managed_service_accounts boolean DEFAULT false,
    system_monitoring boolean DEFAULT false NOT NULL,
    bigquery_reservation_search character varying(255),
    bigquery_reservation_alerts character varying(255)
);


ALTER TABLE _analytics.users OWNER TO supabase_admin;

--
-- Name: users_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.users_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.users_id_seq OWNER TO supabase_admin;

--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.users_id_seq OWNED BY _analytics.users.id;


--
-- Name: vercel_auths; Type: TABLE; Schema: _analytics; Owner: supabase_admin
--

CREATE TABLE _analytics.vercel_auths (
    id bigint NOT NULL,
    access_token character varying(255),
    installation_id character varying(255),
    team_id character varying(255),
    token_type character varying(255),
    vercel_user_id character varying(255),
    user_id bigint,
    inserted_at timestamp(0) without time zone NOT NULL,
    updated_at timestamp(0) without time zone NOT NULL
);


ALTER TABLE _analytics.vercel_auths OWNER TO supabase_admin;

--
-- Name: vercel_auths_id_seq; Type: SEQUENCE; Schema: _analytics; Owner: supabase_admin
--

CREATE SEQUENCE _analytics.vercel_auths_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE _analytics.vercel_auths_id_seq OWNER TO supabase_admin;

--
-- Name: vercel_auths_id_seq; Type: SEQUENCE OWNED BY; Schema: _analytics; Owner: supabase_admin
--

ALTER SEQUENCE _analytics.vercel_auths_id_seq OWNED BY _analytics.vercel_auths.id;


--
-- Name: alert_queries id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.alert_queries ALTER COLUMN id SET DEFAULT nextval('_analytics.alert_queries_id_seq'::regclass);


--
-- Name: alert_queries_backends id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.alert_queries_backends ALTER COLUMN id SET DEFAULT nextval('_analytics.alert_queries_backends_id_seq'::regclass);


--
-- Name: backends id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.backends ALTER COLUMN id SET DEFAULT nextval('_analytics.backends_id_seq'::regclass);


--
-- Name: billing_accounts id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.billing_accounts ALTER COLUMN id SET DEFAULT nextval('_analytics.billing_accounts_id_seq'::regclass);


--
-- Name: billing_counts id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.billing_counts ALTER COLUMN id SET DEFAULT nextval('_analytics.billing_counts_id_seq'::regclass);


--
-- Name: endpoint_queries id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.endpoint_queries ALTER COLUMN id SET DEFAULT nextval('_analytics.endpoint_queries_id_seq'::regclass);


--
-- Name: oauth_access_grants id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.oauth_access_grants ALTER COLUMN id SET DEFAULT nextval('_analytics.oauth_access_grants_id_seq'::regclass);


--
-- Name: oauth_access_tokens id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.oauth_access_tokens ALTER COLUMN id SET DEFAULT nextval('_analytics.oauth_access_tokens_id_seq'::regclass);


--
-- Name: oauth_applications id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.oauth_applications ALTER COLUMN id SET DEFAULT nextval('_analytics.oauth_applications_id_seq'::regclass);


--
-- Name: partner_users id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.partner_users ALTER COLUMN id SET DEFAULT nextval('_analytics.partner_users_id_seq'::regclass);


--
-- Name: partners id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.partners ALTER COLUMN id SET DEFAULT nextval('_analytics.partners_id_seq'::regclass);


--
-- Name: payment_methods id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.payment_methods ALTER COLUMN id SET DEFAULT nextval('_analytics.payment_methods_id_seq'::regclass);


--
-- Name: plans id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.plans ALTER COLUMN id SET DEFAULT nextval('_analytics.plans_id_seq'::regclass);


--
-- Name: rules id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.rules ALTER COLUMN id SET DEFAULT nextval('_analytics.rules_id_seq'::regclass);


--
-- Name: saved_search_counters id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.saved_search_counters ALTER COLUMN id SET DEFAULT nextval('_analytics.saved_search_counters_id_seq'::regclass);


--
-- Name: saved_searches id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.saved_searches ALTER COLUMN id SET DEFAULT nextval('_analytics.saved_searches_id_seq'::regclass);


--
-- Name: source_backends id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.source_backends ALTER COLUMN id SET DEFAULT nextval('_analytics.source_backends_id_seq'::regclass);


--
-- Name: source_schemas id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.source_schemas ALTER COLUMN id SET DEFAULT nextval('_analytics.source_schemas_id_seq'::regclass);


--
-- Name: sources id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.sources ALTER COLUMN id SET DEFAULT nextval('_analytics.sources_id_seq'::regclass);


--
-- Name: sources_backends id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.sources_backends ALTER COLUMN id SET DEFAULT nextval('_analytics.sources_backends_id_seq'::regclass);


--
-- Name: system_metrics id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.system_metrics ALTER COLUMN id SET DEFAULT nextval('_analytics.system_metrics_id_seq'::regclass);


--
-- Name: team_users id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.team_users ALTER COLUMN id SET DEFAULT nextval('_analytics.team_users_id_seq'::regclass);


--
-- Name: teams id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.teams ALTER COLUMN id SET DEFAULT nextval('_analytics.teams_id_seq'::regclass);


--
-- Name: users id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.users ALTER COLUMN id SET DEFAULT nextval('_analytics.users_id_seq'::regclass);


--
-- Name: vercel_auths id; Type: DEFAULT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.vercel_auths ALTER COLUMN id SET DEFAULT nextval('_analytics.vercel_auths_id_seq'::regclass);


--
-- Data for Name: alert_queries; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.alert_queries (id, name, token, query, description, language, cron, source_mapping, slack_hook_url, webhook_notification_url, user_id, inserted_at, updated_at) FROM stdin;
\.


--
-- Data for Name: alert_queries_backends; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.alert_queries_backends (id, alert_query_id, backend_id) FROM stdin;
\.


--
-- Data for Name: backends; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.backends (id, name, description, user_id, type, config, inserted_at, updated_at, token, metadata, config_encrypted, default_ingest) FROM stdin;
\.


--
-- Data for Name: billing_accounts; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.billing_accounts (id, latest_successful_stripe_session, stripe_customer, user_id, inserted_at, updated_at, stripe_subscriptions, stripe_invoices, "lifetime_plan?", lifetime_plan_invoice, default_payment_method, custom_invoice_fields, lifetime_plan) FROM stdin;
\.


--
-- Data for Name: billing_counts; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.billing_counts (id, node, count, user_id, source_id, inserted_at, updated_at) FROM stdin;
\.


--
-- Data for Name: endpoint_queries; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.endpoint_queries (id, name, token, query, user_id, inserted_at, updated_at, source_mapping, sandboxable, cache_duration_seconds, proactive_requerying_seconds, max_limit, enable_auth, language, description, sandbox_query_id, labels, backend_id, redact_pii) FROM stdin;
1	logs.all	1002d2ae-e6c8-4b9c-9c79-b1854fcfc9a7	with edge_logs as (\nselect \n  t.timestamp,\n  t.id, \n  t.event_message, \n  t.metadata \nfrom `cloudflare.logs.prod` as t\n  cross join unnest(metadata) as m\nwhere\n  -- order of the where clauses matters\n  -- project then timestamp then everything else\n  t.project = @project\n  AND CASE WHEN COALESCE(@iso_timestamp_start, '') = '' THEN  TRUE ELSE  cast(t.timestamp as timestamp) > cast(@iso_timestamp_start as timestamp) END\n  AND CASE WHEN COALESCE(@iso_timestamp_end, '') = '' THEN TRUE ELSE cast(t.timestamp as timestamp) <= cast(@iso_timestamp_end as timestamp) END\norder by\n  cast(t.timestamp as timestamp) desc\n),\n\npostgres_logs as (\n  select \n  t.timestamp,\n  t.id, \n  t.event_message, \n  t.metadata\nfrom `postgres.logs` as t\nwhere\n  -- order of the where clauses matters\n  -- project then timestamp then everything else\n  t.project = @project\n  AND CASE WHEN COALESCE(@iso_timestamp_start, '') = '' THEN  TRUE ELSE  cast(t.timestamp as timestamp) > cast(@iso_timestamp_start as timestamp) END\n  AND CASE WHEN COALESCE(@iso_timestamp_end, '') = '' THEN TRUE ELSE cast(t.timestamp as timestamp) <= cast(@iso_timestamp_end as timestamp) END\n  order by cast(t.timestamp as timestamp) desc\n),\n\nfunction_edge_logs as (\nselect \n  t.timestamp,\n  t.id, \n  t.event_message, \n  t.metadata \nfrom `deno-relay-logs` as t\n  cross join unnest(t.metadata) as m\nwhere\n  CASE WHEN COALESCE(@iso_timestamp_start, '') = '' THEN  TRUE ELSE  cast(t.timestamp as timestamp) > cast(@iso_timestamp_start as timestamp) END\n  AND CASE WHEN COALESCE(@iso_timestamp_end, '') = '' THEN TRUE ELSE cast(t.timestamp as timestamp) <= cast(@iso_timestamp_end as timestamp) END\n  and m.project_ref = @project\norder by cast(t.timestamp as timestamp) desc\n),\n\nfunction_logs as (\nselect \n  t.timestamp,\n  t.id, \n  t.event_message, \n  t.metadata \nfrom `deno-subhosting-events` as t\n  cross join unnest(t.metadata) as m\nwhere\n  -- order of the where clauses matters\n  -- project then timestamp then everything else\n  m.project_ref = @project\n  AND CASE WHEN COALESCE(@iso_timestamp_start, '') = '' THEN  TRUE ELSE  cast(t.timestamp as timestamp) > cast(@iso_timestamp_start as timestamp) END\n  AND CASE WHEN COALESCE(@iso_timestamp_end, '') = '' THEN TRUE ELSE cast(t.timestamp as timestamp) <= cast(@iso_timestamp_end as timestamp) END\norder by cast(t.timestamp as timestamp) desc\n),\n\nauth_logs as (\nselect \n  t.timestamp,\n  t.id, \n  t.event_message, \n  t.metadata \nfrom `gotrue.logs.prod` as t\n  cross join unnest(t.metadata) as m\nwhere\n  -- order of the where clauses matters\n  -- project then timestamp then everything else\n  -- m.project = @project\n  t.project = @project\n  AND CASE WHEN COALESCE(@iso_timestamp_start, '') = '' THEN  TRUE ELSE  cast(t.timestamp as timestamp) > cast(@iso_timestamp_start as timestamp) END\n  AND CASE WHEN COALESCE(@iso_timestamp_end, '') = '' THEN TRUE ELSE cast(t.timestamp as timestamp) <= cast(@iso_timestamp_end as timestamp) END\norder by cast(t.timestamp as timestamp) desc\n),\n\nrealtime_logs as (\nselect \n  t.timestamp,\n  t.id, \n  t.event_message, \n  t.metadata \nfrom `realtime.logs.prod` as t\n  cross join unnest(t.metadata) as m\nwhere\n  m.project = @project \n  AND CASE WHEN COALESCE(@iso_timestamp_start, '') = '' THEN  TRUE ELSE  cast(t.timestamp as timestamp) > cast(@iso_timestamp_start as timestamp) END\n  AND CASE WHEN COALESCE(@iso_timestamp_end, '') = '' THEN TRUE ELSE cast(t.timestamp as timestamp) <= cast(@iso_timestamp_end as timestamp) END\norder by cast(t.timestamp as timestamp) desc\n),\n\nstorage_logs as (\nselect \n  t.timestamp,\n  t.id, \n  t.event_message, \n  t.metadata \nfrom `storage.logs.prod.2` as t\n  cross join unnest(t.metadata) as m\nwhere\n  m.project = @project\n  AND CASE WHEN COALESCE(@iso_timestamp_start, '') = '' THEN  TRUE ELSE  cast(t.timestamp as timestamp) > cast(@iso_timestamp_start as timestamp) END\n  AND CASE WHEN COALESCE(@iso_timestamp_end, '') = '' THEN TRUE ELSE cast(t.timestamp as timestamp) <= cast(@iso_timestamp_end as timestamp) END\norder by cast(t.timestamp as timestamp) desc\n),\n\npostgrest_logs as (\nselect \n  t.timestamp,\n  t.id, \n  t.event_message, \n  t.metadata \nfrom `postgREST.logs.prod` as t\n  cross join unnest(t.metadata) as m\nwhere\n  CASE WHEN COALESCE(@iso_timestamp_start, '') = '' THEN  TRUE ELSE  cast(t.timestamp as timestamp) > cast(@iso_timestamp_start as timestamp) END\n  AND CASE WHEN COALESCE(@iso_timestamp_end, '') = '' THEN TRUE ELSE cast(t.timestamp as timestamp) <= cast(@iso_timestamp_end as timestamp) END\n  AND t.project = @project\norder by cast(t.timestamp as timestamp) desc\n),\n\npgbouncer_logs as (\nselect \n  t.timestamp,\n  t.id, \n  t.event_message, \n  t.metadata \nfrom `pgbouncer.logs.prod` as t\n  cross join unnest(t.metadata) as m\nwhere\n  CASE WHEN COALESCE(@iso_timestamp_start, '') = '' THEN  TRUE ELSE  cast(t.timestamp as timestamp) > cast(@iso_timestamp_start as timestamp) END\n  AND CASE WHEN COALESCE(@iso_timestamp_end, '') = '' THEN TRUE ELSE cast(t.timestamp as timestamp) <= cast(@iso_timestamp_end as timestamp) END\n  AND t.project = @project\norder by cast(t.timestamp as timestamp) desc\n)\n\nSELECT id, timestamp, event_message, metadata\nFROM edge_logs\nLIMIT 100	1	2026-03-23 10:13:30	2026-03-23 10:13:30	{"postgres.logs": "ebc6c601-12e9-4886-97c4-9f5a0e3cbde3", "deno-relay-logs": "2e83f1e3-3749-45d2-9f79-ffac71f126b9", "gotrue.logs.prod": "6a23fe1a-f67a-4579-9307-a7fc4e02505f", "realtime.logs.prod": "7b2a211d-733d-4cac-b6dd-aa13bbe48af1", "pgbouncer.logs.prod": "4f78826b-0fb2-4bf5-87ae-651938059363", "postgREST.logs.prod": "648bd7d8-1db2-4fd2-ac66-8fb8cc3b6223", "storage.logs.prod.2": "29bf272f-963f-428c-92d6-9d23d82db2b9", "cloudflare.logs.prod": "5d610146-c53c-4ae2-8f07-b464282231c6", "deno-subhosting-events": "ec5fd879-cdfc-46fd-ae8e-c7f8729d6e3e"}	t	0	1800	1000	t	bq_sql	\N	\N	\N	\N	f
2	usage.api-counts	f788e443-a687-4d6a-b55a-64dff14d11a9	with \ndates as (\n  select (case\n    when @interval = 'hourly' then timestamp_sub(current_timestamp(), interval 1 hour)\n    when @interval = 'daily' then timestamp_sub(current_timestamp(), interval 7 day)\n    when @interval = 'minutely' then timestamp_sub(current_timestamp(), interval 60 minute)\n  end) as start\n),\nchart_counts as (\nselect\n  (case\n    when @interval = 'hourly' then timestamp_trunc(f0.timestamp,  hour)\n    when @interval = 'daily' then timestamp_trunc(f0.timestamp,  day)\n    when @interval = 'minutely' then timestamp_trunc(f0.timestamp,  minute)\n  end\n  ) as timestamp,\n  COUNTIF(REGEXP_CONTAINS(f2.path, '/rest')) as total_rest_requests,\n  COUNTIF(REGEXP_CONTAINS(f2.path, '/storage')) as total_storage_requests,\n  COUNTIF(REGEXP_CONTAINS(f2.path, '/auth')) as total_auth_requests,\n  COUNTIF(REGEXP_CONTAINS(f2.path, '/realtime')) as total_realtime_requests,\nFROM\n  dates, \n  `cloudflare.logs.prod` as f0\n  LEFT JOIN UNNEST(metadata) AS f1 ON TRUE\n  LEFT JOIN UNNEST(f1.request) AS f2 ON TRUE\nwhere\n  REGEXP_CONTAINS(f2.url, @project) AND f0.timestamp >= dates[0]\n  -- project = @project\nGROUP BY\n    timestamp\n)\nSELECT\n    datetime(chart_counts.timestamp, 'UTC') as timestamp,\n    COALESCE(SUM(chart_counts.total_rest_requests), 0) as total_rest_requests,\n    COALESCE(SUM(chart_counts.total_storage_requests), 0) as total_storage_requests,\n    COALESCE(SUM(chart_counts.total_auth_requests), 0) as total_auth_requests,\n    COALESCE(SUM(chart_counts.total_realtime_requests), 0) as total_realtime_requests,\nFROM  \n  chart_counts\nGROUP BY\n    timestamp\nORDER BY\n    timestamp asc;	1	2026-03-23 10:13:30	2026-03-23 10:13:30	{"cloudflare.logs.prod": "5d610146-c53c-4ae2-8f07-b464282231c6"}	t	900	300	1000	t	bq_sql	\N	\N	\N	\N	f
\.


--
-- Data for Name: log_events_29bf272f_963f_428c_92d6_9d23d82db2b9; Type: TABLE DATA; Schema: _analytics; Owner: postgres
--

COPY _analytics.log_events_29bf272f_963f_428c_92d6_9d23d82db2b9 (id, body, event_message, "timestamp") FROM stdin;
\.


--
-- Data for Name: log_events_2e83f1e3_3749_45d2_9f79_ffac71f126b9; Type: TABLE DATA; Schema: _analytics; Owner: postgres
--

COPY _analytics.log_events_2e83f1e3_3749_45d2_9f79_ffac71f126b9 (id, body, event_message, "timestamp") FROM stdin;
\.


--
-- Data for Name: log_events_4f78826b_0fb2_4bf5_87ae_651938059363; Type: TABLE DATA; Schema: _analytics; Owner: postgres
--

COPY _analytics.log_events_4f78826b_0fb2_4bf5_87ae_651938059363 (id, body, event_message, "timestamp") FROM stdin;
\.


--
-- Data for Name: log_events_5d610146_c53c_4ae2_8f07_b464282231c6; Type: TABLE DATA; Schema: _analytics; Owner: postgres
--

COPY _analytics.log_events_5d610146_c53c_4ae2_8f07_b464282231c6 (id, body, event_message, "timestamp") FROM stdin;
\.


--
-- Data for Name: log_events_648bd7d8_1db2_4fd2_ac66_8fb8cc3b6223; Type: TABLE DATA; Schema: _analytics; Owner: postgres
--

COPY _analytics.log_events_648bd7d8_1db2_4fd2_ac66_8fb8cc3b6223 (id, body, event_message, "timestamp") FROM stdin;
\.


--
-- Data for Name: log_events_6a23fe1a_f67a_4579_9307_a7fc4e02505f; Type: TABLE DATA; Schema: _analytics; Owner: postgres
--

COPY _analytics.log_events_6a23fe1a_f67a_4579_9307_a7fc4e02505f (id, body, event_message, "timestamp") FROM stdin;
\.


--
-- Data for Name: log_events_7b2a211d_733d_4cac_b6dd_aa13bbe48af1; Type: TABLE DATA; Schema: _analytics; Owner: postgres
--

COPY _analytics.log_events_7b2a211d_733d_4cac_b6dd_aa13bbe48af1 (id, body, event_message, "timestamp") FROM stdin;
\.


--
-- Data for Name: log_events_ebc6c601_12e9_4886_97c4_9f5a0e3cbde3; Type: TABLE DATA; Schema: _analytics; Owner: postgres
--

COPY _analytics.log_events_ebc6c601_12e9_4886_97c4_9f5a0e3cbde3 (id, body, event_message, "timestamp") FROM stdin;
\.


--
-- Data for Name: log_events_ec5fd879_cdfc_46fd_ae8e_c7f8729d6e3e; Type: TABLE DATA; Schema: _analytics; Owner: postgres
--

COPY _analytics.log_events_ec5fd879_cdfc_46fd_ae8e_c7f8729d6e3e (id, body, event_message, "timestamp") FROM stdin;
\.


--
-- Data for Name: oauth_access_grants; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.oauth_access_grants (id, resource_owner_id, application_id, token, expires_in, redirect_uri, revoked_at, scopes, inserted_at) FROM stdin;
\.


--
-- Data for Name: oauth_access_tokens; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.oauth_access_tokens (id, application_id, resource_owner_id, token, refresh_token, expires_in, revoked_at, scopes, previous_refresh_token, inserted_at, updated_at, description) FROM stdin;
1	\N	1	api-key	\N	\N	\N	private		2026-03-23 10:13:30	2026-03-23 10:13:30	LOGFLARE_PRIVATE_ACCESS_TOKEN
\.


--
-- Data for Name: oauth_applications; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.oauth_applications (id, owner_id, name, uid, secret, redirect_uri, scopes, inserted_at, updated_at) FROM stdin;
\.


--
-- Data for Name: partner_users; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.partner_users (id, partner_id, user_id, upgraded) FROM stdin;
\.


--
-- Data for Name: partners; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.partners (id, name, token) FROM stdin;
\.


--
-- Data for Name: payment_methods; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.payment_methods (id, stripe_id, price_id, last_four, brand, exp_year, exp_month, customer_id, inserted_at, updated_at) FROM stdin;
\.


--
-- Data for Name: plans; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.plans (id, name, stripe_id, inserted_at, updated_at, period, price, limit_sources, limit_rate_limit, limit_alert_freq, limit_source_rate_limit, limit_saved_search_limit, limit_team_users_limit, limit_source_fields_limit, limit_source_ttl, type) FROM stdin;
1	Enterprise	\N	2026-03-23 10:13:30	2026-03-23 10:13:30	year	20000	500	500000	1000	100000	1	2	500	5184000000	standard
\.


--
-- Data for Name: rules; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.rules (id, regex, sink, source_id, inserted_at, updated_at, regex_struct, lql_string, lql_filters, backend_id, token) FROM stdin;
\.


--
-- Data for Name: saved_search_counters; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.saved_search_counters (id, "timestamp", saved_search_id, granularity, non_tailing_count, tailing_count) FROM stdin;
\.


--
-- Data for Name: saved_searches; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.saved_searches (id, querystring, source_id, inserted_at, updated_at, saved_by_user, lql_filters, lql_charts, "tailing?", tailing) FROM stdin;
\.


--
-- Data for Name: schema_migrations; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.schema_migrations (version, inserted_at) FROM stdin;
20181212161742	2026-03-23 10:13:21
20181212220417	2026-03-23 10:13:21
20181212220843	2026-03-23 10:13:21
20181219123536	2026-03-23 10:13:21
20181220234951	2026-03-23 10:13:21
20190111193432	2026-03-23 10:13:21
20190111222747	2026-03-23 10:13:21
20190111223908	2026-03-23 10:13:21
20190128145905	2026-03-23 10:13:21
20190211145604	2026-03-23 10:13:21
20190211215002	2026-03-23 10:13:21
20190212190412	2026-03-23 10:13:21
20190218171231	2026-03-23 10:13:21
20190220020658	2026-03-23 10:13:21
20190220150309	2026-03-23 10:13:22
20190226224323	2026-03-23 10:13:22
20190226225345	2026-03-23 10:13:22
20190313222100	2026-03-23 10:13:22
20190314210542	2026-03-23 10:13:22
20190314234158	2026-03-23 10:13:22
20190321135403	2026-03-23 10:13:22
20190322184724	2026-03-23 10:13:22
20190322194928	2026-03-23 10:13:22
20190326182605	2026-03-23 10:13:22
20190507163835	2026-03-23 10:13:22
20190509154645	2026-03-23 10:13:22
20190522200854	2026-03-23 10:13:22
20190528132518	2026-03-23 10:13:22
20190603134249	2026-03-23 10:13:22
20190604130811	2026-03-23 10:13:22
20190814185734	2026-03-23 10:13:22
20190815222912	2026-03-23 10:13:22
20190820170701	2026-03-23 10:13:22
20190823211533	2026-03-23 10:13:22
20190912214717	2026-03-23 10:13:22
20191007163747	2026-03-23 10:13:22
20191014233159	2026-03-23 10:13:22
20191108163345	2026-03-23 10:13:22
20191111221000	2026-03-23 10:13:22
20191114120409	2026-03-23 10:13:22
20191226181646	2026-03-23 10:13:22
20191230164304	2026-03-23 10:13:22
20200106161131	2026-03-23 10:13:22
20200109165508	2026-03-23 10:13:22
20200113132611	2026-03-23 10:13:22
20200114231904	2026-03-23 10:13:22
20200116122225	2026-03-23 10:13:22
20200116143027	2026-03-23 10:13:22
20200130185455	2026-03-23 10:13:22
20200205180641	2026-03-23 10:13:22
20200311175358	2026-03-23 10:13:22
20200317130710	2026-03-23 10:13:22
20200319164038	2026-03-23 10:13:22
20200320161900	2026-03-23 10:13:22
20200401102642	2026-03-23 10:13:22
20200401132720	2026-03-23 10:13:22
20200401182732	2026-03-23 10:13:22
20200402180315	2026-03-23 10:13:22
20200403130311	2026-03-23 10:13:22
20200409120508	2026-03-23 10:13:22
20200409150827	2026-03-23 10:13:22
20200413161605	2026-03-23 10:13:22
20200422211654	2026-03-23 10:13:22
20200507184618	2026-03-23 10:13:22
20200512205718	2026-03-23 10:13:22
20200513154911	2026-03-23 10:13:22
20200519181117	2026-03-23 10:13:22
20200603150413	2026-03-23 10:13:22
20200605164057	2026-03-23 10:13:22
20200605185446	2026-03-23 10:13:22
20200606140153	2026-03-23 10:13:22
20200803211251	2026-03-23 10:13:22
20200806201742	2026-03-23 10:13:22
20200824155733	2026-03-23 10:13:22
20200826141015	2026-03-23 10:13:22
20201130170051	2026-03-23 10:13:22
20201211125013	2026-03-23 10:13:22
20201229174131	2026-03-23 10:13:22
20210104192144	2026-03-23 10:13:22
20210106205729	2026-03-23 10:13:22
20210118220058	2026-03-23 10:13:22
20210121220159	2026-03-23 10:13:22
20210204203050	2026-03-23 10:13:22
20210215163446	2026-03-23 10:13:22
20210215165548	2026-03-23 10:13:22
20210322193905	2026-03-23 10:13:22
20210521142331	2026-03-23 10:13:22
20210526120333	2026-03-23 10:13:22
20210707201854	2026-03-23 10:13:22
20210712201152	2026-03-23 10:13:22
20210715022534	2026-03-23 10:13:22
20210728172720	2026-03-23 10:13:22
20210729161959	2026-03-23 10:13:22
20210802194723	2026-03-23 10:13:22
20210803020354	2026-03-23 10:13:22
20210804210634	2026-03-23 10:13:22
20210810182003	2026-03-23 10:13:22
20210830181842	2026-03-23 10:13:22
20211027175016	2026-03-23 10:13:22
20211122181200	2026-03-23 10:13:22
20211123192744	2026-03-23 10:13:22
20211130190948	2026-03-23 10:13:22
20211130201505	2026-03-23 10:13:22
20220310172806	2026-03-23 10:13:22
20220523135557	2026-03-23 10:13:22
20220524125216	2026-03-23 10:13:23
20220707030041	2026-03-23 10:13:23
20220714033012	2026-03-23 10:13:23
20220803211705	2026-03-23 10:13:23
20221210010955	2026-03-23 10:13:23
20221210011115	2026-03-23 10:13:23
20230110121321	2026-03-23 10:13:23
20230206155428	2026-03-23 10:13:23
20230223162441	2026-03-23 10:13:23
20230227183828	2026-03-23 10:13:23
20230622160150	2026-03-23 10:13:23
20230622160250	2026-03-23 10:13:23
20230714041101	2026-03-23 10:13:23
20230727111150	2026-03-23 10:13:23
20230807162746	2026-03-23 10:13:23
20230911181436	2026-03-23 10:13:23
20231023174255	2026-03-23 10:13:23
20231027221103	2026-03-23 10:13:23
20231207113137	2026-03-23 10:13:23
20231213013433	2026-03-23 10:13:23
20240214170611	2026-03-23 10:13:23
20240219101411	2026-03-23 10:13:23
20240223104413	2026-03-23 10:13:23
20240327073534	2026-03-23 10:13:23
20240429194758	2026-03-23 10:13:23
20240708025030	2026-03-23 10:13:23
20240725033149	2026-03-23 10:13:23
20240725083359	2026-03-23 10:13:23
20240802110527	2026-03-23 10:13:23
20240806105357	2026-03-23 10:13:23
20240808172408	2026-03-23 10:13:23
20241121183147	2026-03-23 10:13:23
20241204120824	2026-03-23 10:13:23
20250203131456	2026-03-23 10:13:23
20250221154207	2026-03-23 10:13:23
20250224140820	2026-03-23 10:13:23
20250422145132	2026-03-23 10:13:23
20250507072233	2026-03-23 10:13:23
20250518215453	2026-03-23 10:13:23
20250605124931	2026-03-23 10:13:23
20250617074424	2026-03-23 10:13:23
20250617075400	2026-03-23 10:13:23
20250630074142	2026-03-23 10:13:23
20250702081228	2026-03-23 10:13:23
20250709072539	2026-03-23 10:13:23
20250710164717	2026-03-23 10:13:23
20250804174212	2026-03-23 10:13:23
20250804175351	2026-03-23 10:13:23
20250902185149	2026-03-23 10:13:23
20250918055134	2026-03-23 10:13:23
20250922180823	2026-03-23 10:13:24
20251112085259	2026-03-23 10:13:24
20251205181853	2026-03-23 10:13:24
20251216204334	2026-03-23 10:13:24
20251216234322	2026-03-23 10:13:24
\.


--
-- Data for Name: source_backends; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.source_backends (id, source_id, type, config, inserted_at, updated_at) FROM stdin;
\.


--
-- Data for Name: source_schemas; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.source_schemas (id, bigquery_schema, source_id, inserted_at, updated_at, schema_flat_map) FROM stdin;
\.


--
-- Data for Name: sources; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.sources (id, name, token, inserted_at, updated_at, user_id, public_token, favorite, bigquery_table_ttl, api_quota, webhook_notification_url, slack_hook_url, notifications, custom_event_message_keys, log_events_updated_at, bigquery_schema, notifications_every, bq_table_partition_type, lock_schema, validate_schema, drop_lql_filters, drop_lql_string, v2_pipeline, suggested_keys, service_name, transform_copy_fields, disable_tailing, bq_storage_write_api, bigquery_clustering_fields, default_ingest_backend_enabled, system_source, system_source_type, labels) FROM stdin;
1	cloudflare.logs.prod	5d610146-c53c-4ae2-8f07-b464282231c6	2026-03-23 10:13:30	2026-03-23 10:13:30	1	\N	f	\N	25	\N	\N	{"team_user_ids_for_sms": [], "team_user_ids_for_email": [], "user_text_notifications": false, "user_email_notifications": false, "other_email_notifications": null, "team_user_ids_for_schema_updates": [], "user_schema_update_notifications": true}	\N	\N	\N	14400000	timestamp	f	t	\\x836a	\N	f		\N	\N	f	f	\N	f	f	\N	\N
2	postgres.logs	ebc6c601-12e9-4886-97c4-9f5a0e3cbde3	2026-03-23 10:13:30	2026-03-23 10:13:30	1	\N	f	\N	25	\N	\N	{"team_user_ids_for_sms": [], "team_user_ids_for_email": [], "user_text_notifications": false, "user_email_notifications": false, "other_email_notifications": null, "team_user_ids_for_schema_updates": [], "user_schema_update_notifications": true}	\N	\N	\N	14400000	timestamp	f	t	\\x836a	\N	f		\N	\N	f	f	\N	f	f	\N	\N
3	deno-relay-logs	2e83f1e3-3749-45d2-9f79-ffac71f126b9	2026-03-23 10:13:30	2026-03-23 10:13:30	1	\N	f	\N	25	\N	\N	{"team_user_ids_for_sms": [], "team_user_ids_for_email": [], "user_text_notifications": false, "user_email_notifications": false, "other_email_notifications": null, "team_user_ids_for_schema_updates": [], "user_schema_update_notifications": true}	\N	\N	\N	14400000	timestamp	f	t	\\x836a	\N	f		\N	\N	f	f	\N	f	f	\N	\N
4	deno-subhosting-events	ec5fd879-cdfc-46fd-ae8e-c7f8729d6e3e	2026-03-23 10:13:30	2026-03-23 10:13:30	1	\N	f	\N	25	\N	\N	{"team_user_ids_for_sms": [], "team_user_ids_for_email": [], "user_text_notifications": false, "user_email_notifications": false, "other_email_notifications": null, "team_user_ids_for_schema_updates": [], "user_schema_update_notifications": true}	\N	\N	\N	14400000	timestamp	f	t	\\x836a	\N	f		\N	\N	f	f	\N	f	f	\N	\N
5	gotrue.logs.prod	6a23fe1a-f67a-4579-9307-a7fc4e02505f	2026-03-23 10:13:30	2026-03-23 10:13:30	1	\N	f	\N	25	\N	\N	{"team_user_ids_for_sms": [], "team_user_ids_for_email": [], "user_text_notifications": false, "user_email_notifications": false, "other_email_notifications": null, "team_user_ids_for_schema_updates": [], "user_schema_update_notifications": true}	\N	\N	\N	14400000	timestamp	f	t	\\x836a	\N	f		\N	\N	f	f	\N	f	f	\N	\N
6	realtime.logs.prod	7b2a211d-733d-4cac-b6dd-aa13bbe48af1	2026-03-23 10:13:30	2026-03-23 10:13:30	1	\N	f	\N	25	\N	\N	{"team_user_ids_for_sms": [], "team_user_ids_for_email": [], "user_text_notifications": false, "user_email_notifications": false, "other_email_notifications": null, "team_user_ids_for_schema_updates": [], "user_schema_update_notifications": true}	\N	\N	\N	14400000	timestamp	f	t	\\x836a	\N	f		\N	\N	f	f	\N	f	f	\N	\N
7	storage.logs.prod.2	29bf272f-963f-428c-92d6-9d23d82db2b9	2026-03-23 10:13:30	2026-03-23 10:13:30	1	\N	f	\N	25	\N	\N	{"team_user_ids_for_sms": [], "team_user_ids_for_email": [], "user_text_notifications": false, "user_email_notifications": false, "other_email_notifications": null, "team_user_ids_for_schema_updates": [], "user_schema_update_notifications": true}	\N	\N	\N	14400000	timestamp	f	t	\\x836a	\N	f		\N	\N	f	f	\N	f	f	\N	\N
8	postgREST.logs.prod	648bd7d8-1db2-4fd2-ac66-8fb8cc3b6223	2026-03-23 10:13:30	2026-03-23 10:13:30	1	\N	f	\N	25	\N	\N	{"team_user_ids_for_sms": [], "team_user_ids_for_email": [], "user_text_notifications": false, "user_email_notifications": false, "other_email_notifications": null, "team_user_ids_for_schema_updates": [], "user_schema_update_notifications": true}	\N	\N	\N	14400000	timestamp	f	t	\\x836a	\N	f		\N	\N	f	f	\N	f	f	\N	\N
9	pgbouncer.logs.prod	4f78826b-0fb2-4bf5-87ae-651938059363	2026-03-23 10:13:30	2026-03-23 10:13:30	1	\N	f	\N	25	\N	\N	{"team_user_ids_for_sms": [], "team_user_ids_for_email": [], "user_text_notifications": false, "user_email_notifications": false, "other_email_notifications": null, "team_user_ids_for_schema_updates": [], "user_schema_update_notifications": true}	\N	\N	\N	14400000	timestamp	f	t	\\x836a	\N	f		\N	\N	f	f	\N	f	f	\N	\N
\.


--
-- Data for Name: sources_backends; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.sources_backends (id, backend_id, source_id) FROM stdin;
\.


--
-- Data for Name: system_metrics; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.system_metrics (id, all_logs_logged, node, inserted_at, updated_at) FROM stdin;
1	0	logflare@127.0.0.1	2026-03-23 10:13:35	2026-03-23 10:13:35
\.


--
-- Data for Name: team_users; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.team_users (id, email, token, provider, email_preferred, name, image, email_me_product, phone, valid_google_account, provider_uid, team_id, inserted_at, updated_at, preferences) FROM stdin;
\.


--
-- Data for Name: teams; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.teams (id, name, user_id, inserted_at, updated_at, token) FROM stdin;
\.


--
-- Data for Name: users; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.users (id, email, provider, token, inserted_at, updated_at, api_key, old_api_key, email_preferred, name, image, email_me_product, admin, phone, bigquery_project_id, api_quota, bigquery_dataset_location, bigquery_dataset_id, valid_google_account, provider_uid, company, bigquery_udfs_hash, bigquery_processed_bytes_limit, "billing_enabled?", preferences, billing_enabled, endpoints_beta, metadata, partner_upgraded, partner_id, bigquery_enable_managed_service_accounts, system_monitoring, bigquery_reservation_search, bigquery_reservation_alerts) FROM stdin;
1	default@logflare.app	default	ab2d5ed7-0994-4b9a-9dab-cd13725b564d	2026-03-23 10:13:30	2026-03-23 10:13:30	3k_7tHd_yVIv	\N	default@logflare.app	default	\N	f	f	\N	\N	150	\N	\N	\N	default	\N		10000000000	f	\N	t	t	\N	f	\N	f	f	\N	\N
\.


--
-- Data for Name: vercel_auths; Type: TABLE DATA; Schema: _analytics; Owner: supabase_admin
--

COPY _analytics.vercel_auths (id, access_token, installation_id, team_id, token_type, vercel_user_id, user_id, inserted_at, updated_at) FROM stdin;
\.


--
-- Name: alert_queries_backends_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.alert_queries_backends_id_seq', 1, false);


--
-- Name: alert_queries_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.alert_queries_id_seq', 1, false);


--
-- Name: backends_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.backends_id_seq', 1, false);


--
-- Name: billing_accounts_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.billing_accounts_id_seq', 1, false);


--
-- Name: billing_counts_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.billing_counts_id_seq', 1, false);


--
-- Name: endpoint_queries_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.endpoint_queries_id_seq', 2, true);


--
-- Name: oauth_access_grants_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.oauth_access_grants_id_seq', 1, false);


--
-- Name: oauth_access_tokens_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.oauth_access_tokens_id_seq', 1, true);


--
-- Name: oauth_applications_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.oauth_applications_id_seq', 1, false);


--
-- Name: partner_users_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.partner_users_id_seq', 1, false);


--
-- Name: partners_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.partners_id_seq', 1, false);


--
-- Name: payment_methods_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.payment_methods_id_seq', 1, false);


--
-- Name: plans_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.plans_id_seq', 1, true);


--
-- Name: rules_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.rules_id_seq', 1, false);


--
-- Name: saved_search_counters_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.saved_search_counters_id_seq', 1, false);


--
-- Name: saved_searches_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.saved_searches_id_seq', 1, false);


--
-- Name: source_backends_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.source_backends_id_seq', 1, false);


--
-- Name: source_schemas_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.source_schemas_id_seq', 1, false);


--
-- Name: sources_backends_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.sources_backends_id_seq', 1, false);


--
-- Name: sources_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.sources_id_seq', 9, true);


--
-- Name: system_metrics_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.system_metrics_id_seq', 1, true);


--
-- Name: team_users_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.team_users_id_seq', 1, false);


--
-- Name: teams_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.teams_id_seq', 1, false);


--
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.users_id_seq', 12, true);


--
-- Name: vercel_auths_id_seq; Type: SEQUENCE SET; Schema: _analytics; Owner: supabase_admin
--

SELECT pg_catalog.setval('_analytics.vercel_auths_id_seq', 1, false);


--
-- Name: alert_queries_backends alert_queries_backends_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.alert_queries_backends
    ADD CONSTRAINT alert_queries_backends_pkey PRIMARY KEY (id);


--
-- Name: alert_queries alert_queries_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.alert_queries
    ADD CONSTRAINT alert_queries_pkey PRIMARY KEY (id);


--
-- Name: backends backends_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.backends
    ADD CONSTRAINT backends_pkey PRIMARY KEY (id);


--
-- Name: billing_accounts billing_accounts_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.billing_accounts
    ADD CONSTRAINT billing_accounts_pkey PRIMARY KEY (id);


--
-- Name: billing_counts billing_counts_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.billing_counts
    ADD CONSTRAINT billing_counts_pkey PRIMARY KEY (id);


--
-- Name: endpoint_queries endpoint_queries_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.endpoint_queries
    ADD CONSTRAINT endpoint_queries_pkey PRIMARY KEY (id);


--
-- Name: log_events_29bf272f_963f_428c_92d6_9d23d82db2b9 log_events_29bf272f_963f_428c_92d6_9d23d82db2b9_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: postgres
--

ALTER TABLE ONLY _analytics.log_events_29bf272f_963f_428c_92d6_9d23d82db2b9
    ADD CONSTRAINT log_events_29bf272f_963f_428c_92d6_9d23d82db2b9_pkey PRIMARY KEY (id);


--
-- Name: log_events_2e83f1e3_3749_45d2_9f79_ffac71f126b9 log_events_2e83f1e3_3749_45d2_9f79_ffac71f126b9_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: postgres
--

ALTER TABLE ONLY _analytics.log_events_2e83f1e3_3749_45d2_9f79_ffac71f126b9
    ADD CONSTRAINT log_events_2e83f1e3_3749_45d2_9f79_ffac71f126b9_pkey PRIMARY KEY (id);


--
-- Name: log_events_4f78826b_0fb2_4bf5_87ae_651938059363 log_events_4f78826b_0fb2_4bf5_87ae_651938059363_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: postgres
--

ALTER TABLE ONLY _analytics.log_events_4f78826b_0fb2_4bf5_87ae_651938059363
    ADD CONSTRAINT log_events_4f78826b_0fb2_4bf5_87ae_651938059363_pkey PRIMARY KEY (id);


--
-- Name: log_events_5d610146_c53c_4ae2_8f07_b464282231c6 log_events_5d610146_c53c_4ae2_8f07_b464282231c6_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: postgres
--

ALTER TABLE ONLY _analytics.log_events_5d610146_c53c_4ae2_8f07_b464282231c6
    ADD CONSTRAINT log_events_5d610146_c53c_4ae2_8f07_b464282231c6_pkey PRIMARY KEY (id);


--
-- Name: log_events_648bd7d8_1db2_4fd2_ac66_8fb8cc3b6223 log_events_648bd7d8_1db2_4fd2_ac66_8fb8cc3b6223_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: postgres
--

ALTER TABLE ONLY _analytics.log_events_648bd7d8_1db2_4fd2_ac66_8fb8cc3b6223
    ADD CONSTRAINT log_events_648bd7d8_1db2_4fd2_ac66_8fb8cc3b6223_pkey PRIMARY KEY (id);


--
-- Name: log_events_6a23fe1a_f67a_4579_9307_a7fc4e02505f log_events_6a23fe1a_f67a_4579_9307_a7fc4e02505f_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: postgres
--

ALTER TABLE ONLY _analytics.log_events_6a23fe1a_f67a_4579_9307_a7fc4e02505f
    ADD CONSTRAINT log_events_6a23fe1a_f67a_4579_9307_a7fc4e02505f_pkey PRIMARY KEY (id);


--
-- Name: log_events_7b2a211d_733d_4cac_b6dd_aa13bbe48af1 log_events_7b2a211d_733d_4cac_b6dd_aa13bbe48af1_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: postgres
--

ALTER TABLE ONLY _analytics.log_events_7b2a211d_733d_4cac_b6dd_aa13bbe48af1
    ADD CONSTRAINT log_events_7b2a211d_733d_4cac_b6dd_aa13bbe48af1_pkey PRIMARY KEY (id);


--
-- Name: log_events_ebc6c601_12e9_4886_97c4_9f5a0e3cbde3 log_events_ebc6c601_12e9_4886_97c4_9f5a0e3cbde3_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: postgres
--

ALTER TABLE ONLY _analytics.log_events_ebc6c601_12e9_4886_97c4_9f5a0e3cbde3
    ADD CONSTRAINT log_events_ebc6c601_12e9_4886_97c4_9f5a0e3cbde3_pkey PRIMARY KEY (id);


--
-- Name: log_events_ec5fd879_cdfc_46fd_ae8e_c7f8729d6e3e log_events_ec5fd879_cdfc_46fd_ae8e_c7f8729d6e3e_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: postgres
--

ALTER TABLE ONLY _analytics.log_events_ec5fd879_cdfc_46fd_ae8e_c7f8729d6e3e
    ADD CONSTRAINT log_events_ec5fd879_cdfc_46fd_ae8e_c7f8729d6e3e_pkey PRIMARY KEY (id);


--
-- Name: oauth_access_grants oauth_access_grants_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.oauth_access_grants
    ADD CONSTRAINT oauth_access_grants_pkey PRIMARY KEY (id);


--
-- Name: oauth_access_tokens oauth_access_tokens_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.oauth_access_tokens
    ADD CONSTRAINT oauth_access_tokens_pkey PRIMARY KEY (id);


--
-- Name: oauth_applications oauth_applications_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.oauth_applications
    ADD CONSTRAINT oauth_applications_pkey PRIMARY KEY (id);


--
-- Name: partner_users partner_users_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.partner_users
    ADD CONSTRAINT partner_users_pkey PRIMARY KEY (id);


--
-- Name: partners partners_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.partners
    ADD CONSTRAINT partners_pkey PRIMARY KEY (id);


--
-- Name: payment_methods payment_methods_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.payment_methods
    ADD CONSTRAINT payment_methods_pkey PRIMARY KEY (id);


--
-- Name: plans plans_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.plans
    ADD CONSTRAINT plans_pkey PRIMARY KEY (id);


--
-- Name: rules rules_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.rules
    ADD CONSTRAINT rules_pkey PRIMARY KEY (id);


--
-- Name: saved_search_counters saved_search_counters_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.saved_search_counters
    ADD CONSTRAINT saved_search_counters_pkey PRIMARY KEY (id);


--
-- Name: saved_searches saved_searches_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.saved_searches
    ADD CONSTRAINT saved_searches_pkey PRIMARY KEY (id);


--
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.schema_migrations
    ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);


--
-- Name: source_backends source_backends_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.source_backends
    ADD CONSTRAINT source_backends_pkey PRIMARY KEY (id);


--
-- Name: source_schemas source_schemas_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.source_schemas
    ADD CONSTRAINT source_schemas_pkey PRIMARY KEY (id);


--
-- Name: sources_backends sources_backends_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.sources_backends
    ADD CONSTRAINT sources_backends_pkey PRIMARY KEY (id);


--
-- Name: sources sources_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.sources
    ADD CONSTRAINT sources_pkey PRIMARY KEY (id);


--
-- Name: system_metrics system_metrics_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.system_metrics
    ADD CONSTRAINT system_metrics_pkey PRIMARY KEY (id);


--
-- Name: team_users team_users_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.team_users
    ADD CONSTRAINT team_users_pkey PRIMARY KEY (id);


--
-- Name: teams teams_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.teams
    ADD CONSTRAINT teams_pkey PRIMARY KEY (id);


--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.users
    ADD CONSTRAINT users_pkey PRIMARY KEY (id);


--
-- Name: vercel_auths vercel_auths_pkey; Type: CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.vercel_auths
    ADD CONSTRAINT vercel_auths_pkey PRIMARY KEY (id);


--
-- Name: alert_queries_backends_alert_query_id_backend_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX alert_queries_backends_alert_query_id_backend_id_index ON _analytics.alert_queries_backends USING btree (alert_query_id, backend_id);


--
-- Name: alert_queries_token_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX alert_queries_token_index ON _analytics.alert_queries USING btree (token);


--
-- Name: alert_queries_user_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX alert_queries_user_id_index ON _analytics.alert_queries USING btree (user_id);


--
-- Name: billing_accounts_stripe_customer_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX billing_accounts_stripe_customer_index ON _analytics.billing_accounts USING btree (stripe_customer);


--
-- Name: billing_accounts_user_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX billing_accounts_user_id_index ON _analytics.billing_accounts USING btree (user_id);


--
-- Name: billing_counts_inserted_at_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX billing_counts_inserted_at_index ON _analytics.billing_counts USING btree (inserted_at);


--
-- Name: billing_counts_source_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX billing_counts_source_id_index ON _analytics.billing_counts USING btree (source_id);


--
-- Name: billing_counts_user_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX billing_counts_user_id_index ON _analytics.billing_counts USING btree (user_id);


--
-- Name: endpoint_queries_backend_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX endpoint_queries_backend_id_index ON _analytics.endpoint_queries USING btree (backend_id);


--
-- Name: endpoint_queries_token_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX endpoint_queries_token_index ON _analytics.endpoint_queries USING btree (token);


--
-- Name: endpoint_queries_user_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX endpoint_queries_user_id_index ON _analytics.endpoint_queries USING btree (user_id);


--
-- Name: idx_backends_default_ingest; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX idx_backends_default_ingest ON _analytics.backends USING btree (default_ingest) WHERE (default_ingest = true);


--
-- Name: log_events_29bf272f_963f_428c_92d6_9d23d82db2b9_timestamp_brin_; Type: INDEX; Schema: _analytics; Owner: postgres
--

CREATE INDEX log_events_29bf272f_963f_428c_92d6_9d23d82db2b9_timestamp_brin_ ON _analytics.log_events_29bf272f_963f_428c_92d6_9d23d82db2b9 USING brin ("timestamp");


--
-- Name: log_events_2e83f1e3_3749_45d2_9f79_ffac71f126b9_timestamp_brin_; Type: INDEX; Schema: _analytics; Owner: postgres
--

CREATE INDEX log_events_2e83f1e3_3749_45d2_9f79_ffac71f126b9_timestamp_brin_ ON _analytics.log_events_2e83f1e3_3749_45d2_9f79_ffac71f126b9 USING brin ("timestamp");


--
-- Name: log_events_4f78826b_0fb2_4bf5_87ae_651938059363_timestamp_brin_; Type: INDEX; Schema: _analytics; Owner: postgres
--

CREATE INDEX log_events_4f78826b_0fb2_4bf5_87ae_651938059363_timestamp_brin_ ON _analytics.log_events_4f78826b_0fb2_4bf5_87ae_651938059363 USING brin ("timestamp");


--
-- Name: log_events_5d610146_c53c_4ae2_8f07_b464282231c6_timestamp_brin_; Type: INDEX; Schema: _analytics; Owner: postgres
--

CREATE INDEX log_events_5d610146_c53c_4ae2_8f07_b464282231c6_timestamp_brin_ ON _analytics.log_events_5d610146_c53c_4ae2_8f07_b464282231c6 USING brin ("timestamp");


--
-- Name: log_events_648bd7d8_1db2_4fd2_ac66_8fb8cc3b6223_timestamp_brin_; Type: INDEX; Schema: _analytics; Owner: postgres
--

CREATE INDEX log_events_648bd7d8_1db2_4fd2_ac66_8fb8cc3b6223_timestamp_brin_ ON _analytics.log_events_648bd7d8_1db2_4fd2_ac66_8fb8cc3b6223 USING brin ("timestamp");


--
-- Name: log_events_6a23fe1a_f67a_4579_9307_a7fc4e02505f_timestamp_brin_; Type: INDEX; Schema: _analytics; Owner: postgres
--

CREATE INDEX log_events_6a23fe1a_f67a_4579_9307_a7fc4e02505f_timestamp_brin_ ON _analytics.log_events_6a23fe1a_f67a_4579_9307_a7fc4e02505f USING brin ("timestamp");


--
-- Name: log_events_7b2a211d_733d_4cac_b6dd_aa13bbe48af1_timestamp_brin_; Type: INDEX; Schema: _analytics; Owner: postgres
--

CREATE INDEX log_events_7b2a211d_733d_4cac_b6dd_aa13bbe48af1_timestamp_brin_ ON _analytics.log_events_7b2a211d_733d_4cac_b6dd_aa13bbe48af1 USING brin ("timestamp");


--
-- Name: log_events_ebc6c601_12e9_4886_97c4_9f5a0e3cbde3_timestamp_brin_; Type: INDEX; Schema: _analytics; Owner: postgres
--

CREATE INDEX log_events_ebc6c601_12e9_4886_97c4_9f5a0e3cbde3_timestamp_brin_ ON _analytics.log_events_ebc6c601_12e9_4886_97c4_9f5a0e3cbde3 USING brin ("timestamp");


--
-- Name: log_events_ec5fd879_cdfc_46fd_ae8e_c7f8729d6e3e_timestamp_brin_; Type: INDEX; Schema: _analytics; Owner: postgres
--

CREATE INDEX log_events_ec5fd879_cdfc_46fd_ae8e_c7f8729d6e3e_timestamp_brin_ ON _analytics.log_events_ec5fd879_cdfc_46fd_ae8e_c7f8729d6e3e USING brin ("timestamp");


--
-- Name: oauth_access_grants_token_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX oauth_access_grants_token_index ON _analytics.oauth_access_grants USING btree (token);


--
-- Name: oauth_access_tokens_refresh_token_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX oauth_access_tokens_refresh_token_index ON _analytics.oauth_access_tokens USING btree (refresh_token);


--
-- Name: oauth_access_tokens_resource_owner_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX oauth_access_tokens_resource_owner_id_index ON _analytics.oauth_access_tokens USING btree (resource_owner_id);


--
-- Name: oauth_access_tokens_token_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX oauth_access_tokens_token_index ON _analytics.oauth_access_tokens USING btree (token);


--
-- Name: oauth_applications_owner_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX oauth_applications_owner_id_index ON _analytics.oauth_applications USING btree (owner_id);


--
-- Name: oauth_applications_uid_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX oauth_applications_uid_index ON _analytics.oauth_applications USING btree (uid);


--
-- Name: partner_users_partner_id_user_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX partner_users_partner_id_user_id_index ON _analytics.partner_users USING btree (partner_id, user_id);


--
-- Name: partner_users_partner_id_user_id_upgraded_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX partner_users_partner_id_user_id_upgraded_index ON _analytics.partner_users USING btree (partner_id, user_id, upgraded);


--
-- Name: payment_methods_customer_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX payment_methods_customer_id_index ON _analytics.payment_methods USING btree (customer_id);


--
-- Name: payment_methods_stripe_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX payment_methods_stripe_id_index ON _analytics.payment_methods USING btree (stripe_id);


--
-- Name: rules_source_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX rules_source_id_index ON _analytics.rules USING btree (source_id);


--
-- Name: rules_token_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX rules_token_index ON _analytics.rules USING btree (token);


--
-- Name: saved_search_counters_timestamp_saved_search_id_granularity_ind; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX saved_search_counters_timestamp_saved_search_id_granularity_ind ON _analytics.saved_search_counters USING btree ("timestamp", saved_search_id, granularity);


--
-- Name: saved_searches_querystring_source_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX saved_searches_querystring_source_id_index ON _analytics.saved_searches USING btree (querystring, source_id);


--
-- Name: saved_searches_source_id_inserted_at_idx; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX saved_searches_source_id_inserted_at_idx ON _analytics.saved_searches USING btree (source_id, inserted_at) WHERE (saved_by_user = true);


--
-- Name: source_schemas_source_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX source_schemas_source_id_index ON _analytics.source_schemas USING btree (source_id);


--
-- Name: sources_name_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX sources_name_index ON _analytics.sources USING btree (id, name);


--
-- Name: sources_public_token_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX sources_public_token_index ON _analytics.sources USING btree (public_token);


--
-- Name: sources_token_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX sources_token_index ON _analytics.sources USING btree (token);


--
-- Name: sources_user_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX sources_user_id_index ON _analytics.sources USING btree (user_id);


--
-- Name: sources_user_id_system_source_type_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX sources_user_id_system_source_type_index ON _analytics.sources USING btree (user_id, system_source_type);


--
-- Name: system_metrics_node_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX system_metrics_node_index ON _analytics.system_metrics USING btree (node);


--
-- Name: team_users_provider_uid_team_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX team_users_provider_uid_team_id_index ON _analytics.team_users USING btree (provider_uid, team_id);


--
-- Name: team_users_team_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX team_users_team_id_index ON _analytics.team_users USING btree (team_id);


--
-- Name: teams_token_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX teams_token_index ON _analytics.teams USING btree (token);


--
-- Name: teams_user_id_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX teams_user_id_index ON _analytics.teams USING btree (user_id);


--
-- Name: users_api_key_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE INDEX users_api_key_index ON _analytics.users USING btree (api_key);


--
-- Name: users_lower_email_index; Type: INDEX; Schema: _analytics; Owner: supabase_admin
--

CREATE UNIQUE INDEX users_lower_email_index ON _analytics.users USING btree (lower((email)::text));


--
-- Name: alert_queries_backends alert_queries_backends_alert_query_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.alert_queries_backends
    ADD CONSTRAINT alert_queries_backends_alert_query_id_fkey FOREIGN KEY (alert_query_id) REFERENCES _analytics.alert_queries(id) ON DELETE CASCADE;


--
-- Name: alert_queries_backends alert_queries_backends_backend_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.alert_queries_backends
    ADD CONSTRAINT alert_queries_backends_backend_id_fkey FOREIGN KEY (backend_id) REFERENCES _analytics.backends(id) ON DELETE CASCADE;


--
-- Name: alert_queries alert_queries_user_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.alert_queries
    ADD CONSTRAINT alert_queries_user_id_fkey FOREIGN KEY (user_id) REFERENCES _analytics.users(id) ON DELETE CASCADE;


--
-- Name: backends backends_user_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.backends
    ADD CONSTRAINT backends_user_id_fkey FOREIGN KEY (user_id) REFERENCES _analytics.users(id);


--
-- Name: billing_accounts billing_accounts_user_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.billing_accounts
    ADD CONSTRAINT billing_accounts_user_id_fkey FOREIGN KEY (user_id) REFERENCES _analytics.users(id) ON DELETE CASCADE;


--
-- Name: billing_counts billing_counts_user_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.billing_counts
    ADD CONSTRAINT billing_counts_user_id_fkey FOREIGN KEY (user_id) REFERENCES _analytics.users(id) ON DELETE CASCADE;


--
-- Name: endpoint_queries endpoint_queries_backend_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.endpoint_queries
    ADD CONSTRAINT endpoint_queries_backend_id_fkey FOREIGN KEY (backend_id) REFERENCES _analytics.backends(id) ON DELETE SET NULL;


--
-- Name: endpoint_queries endpoint_queries_sandbox_query_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.endpoint_queries
    ADD CONSTRAINT endpoint_queries_sandbox_query_id_fkey FOREIGN KEY (sandbox_query_id) REFERENCES _analytics.endpoint_queries(id);


--
-- Name: endpoint_queries endpoint_queries_user_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.endpoint_queries
    ADD CONSTRAINT endpoint_queries_user_id_fkey FOREIGN KEY (user_id) REFERENCES _analytics.users(id) ON DELETE CASCADE;


--
-- Name: oauth_access_grants oauth_access_grants_application_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.oauth_access_grants
    ADD CONSTRAINT oauth_access_grants_application_id_fkey FOREIGN KEY (application_id) REFERENCES _analytics.oauth_applications(id);


--
-- Name: oauth_access_tokens oauth_access_tokens_application_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.oauth_access_tokens
    ADD CONSTRAINT oauth_access_tokens_application_id_fkey FOREIGN KEY (application_id) REFERENCES _analytics.oauth_applications(id);


--
-- Name: partner_users partner_users_partner_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.partner_users
    ADD CONSTRAINT partner_users_partner_id_fkey FOREIGN KEY (partner_id) REFERENCES _analytics.partners(id);


--
-- Name: partner_users partner_users_user_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.partner_users
    ADD CONSTRAINT partner_users_user_id_fkey FOREIGN KEY (user_id) REFERENCES _analytics.users(id) ON DELETE CASCADE;


--
-- Name: payment_methods payment_methods_customer_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.payment_methods
    ADD CONSTRAINT payment_methods_customer_id_fkey FOREIGN KEY (customer_id) REFERENCES _analytics.billing_accounts(stripe_customer) ON DELETE CASCADE;


--
-- Name: rules rules_backend_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.rules
    ADD CONSTRAINT rules_backend_id_fkey FOREIGN KEY (backend_id) REFERENCES _analytics.backends(id) ON DELETE CASCADE;


--
-- Name: rules rules_sink_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.rules
    ADD CONSTRAINT rules_sink_fkey FOREIGN KEY (sink) REFERENCES _analytics.sources(token) ON DELETE CASCADE;


--
-- Name: rules rules_source_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.rules
    ADD CONSTRAINT rules_source_id_fkey FOREIGN KEY (source_id) REFERENCES _analytics.sources(id) ON DELETE CASCADE;


--
-- Name: saved_search_counters saved_search_counters_saved_search_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.saved_search_counters
    ADD CONSTRAINT saved_search_counters_saved_search_id_fkey FOREIGN KEY (saved_search_id) REFERENCES _analytics.saved_searches(id) ON DELETE CASCADE;


--
-- Name: saved_searches saved_searches_source_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.saved_searches
    ADD CONSTRAINT saved_searches_source_id_fkey FOREIGN KEY (source_id) REFERENCES _analytics.sources(id) ON DELETE CASCADE;


--
-- Name: source_backends source_backends_source_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.source_backends
    ADD CONSTRAINT source_backends_source_id_fkey FOREIGN KEY (source_id) REFERENCES _analytics.sources(id);


--
-- Name: source_schemas source_schemas_source_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.source_schemas
    ADD CONSTRAINT source_schemas_source_id_fkey FOREIGN KEY (source_id) REFERENCES _analytics.sources(id) ON DELETE CASCADE;


--
-- Name: sources_backends sources_backends_backend_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.sources_backends
    ADD CONSTRAINT sources_backends_backend_id_fkey FOREIGN KEY (backend_id) REFERENCES _analytics.backends(id);


--
-- Name: sources_backends sources_backends_source_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.sources_backends
    ADD CONSTRAINT sources_backends_source_id_fkey FOREIGN KEY (source_id) REFERENCES _analytics.sources(id);


--
-- Name: sources sources_user_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.sources
    ADD CONSTRAINT sources_user_id_fkey FOREIGN KEY (user_id) REFERENCES _analytics.users(id) ON DELETE CASCADE;


--
-- Name: team_users team_users_team_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.team_users
    ADD CONSTRAINT team_users_team_id_fkey FOREIGN KEY (team_id) REFERENCES _analytics.teams(id) ON DELETE CASCADE;


--
-- Name: teams teams_user_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.teams
    ADD CONSTRAINT teams_user_id_fkey FOREIGN KEY (user_id) REFERENCES _analytics.users(id) ON DELETE CASCADE;


--
-- Name: users users_partner_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.users
    ADD CONSTRAINT users_partner_id_fkey FOREIGN KEY (partner_id) REFERENCES _analytics.partners(id);


--
-- Name: vercel_auths vercel_auths_user_id_fkey; Type: FK CONSTRAINT; Schema: _analytics; Owner: supabase_admin
--

ALTER TABLE ONLY _analytics.vercel_auths
    ADD CONSTRAINT vercel_auths_user_id_fkey FOREIGN KEY (user_id) REFERENCES _analytics.users(id) ON DELETE CASCADE;


--
-- Name: logflare_pub; Type: PUBLICATION; Schema: -; Owner: supabase_admin
--

CREATE PUBLICATION logflare_pub WITH (publish = 'insert, update, delete, truncate');


ALTER PUBLICATION logflare_pub OWNER TO supabase_admin;

--
-- Name: logflare_pub backends; Type: PUBLICATION TABLE; Schema: _analytics; Owner: supabase_admin
--

ALTER PUBLICATION logflare_pub ADD TABLE ONLY _analytics.backends;


--
-- Name: logflare_pub billing_accounts; Type: PUBLICATION TABLE; Schema: _analytics; Owner: supabase_admin
--

ALTER PUBLICATION logflare_pub ADD TABLE ONLY _analytics.billing_accounts;


--
-- Name: logflare_pub oauth_access_tokens; Type: PUBLICATION TABLE; Schema: _analytics; Owner: supabase_admin
--

ALTER PUBLICATION logflare_pub ADD TABLE ONLY _analytics.oauth_access_tokens;


--
-- Name: logflare_pub plans; Type: PUBLICATION TABLE; Schema: _analytics; Owner: supabase_admin
--

ALTER PUBLICATION logflare_pub ADD TABLE ONLY _analytics.plans;


--
-- Name: logflare_pub rules; Type: PUBLICATION TABLE; Schema: _analytics; Owner: supabase_admin
--

ALTER PUBLICATION logflare_pub ADD TABLE ONLY _analytics.rules;


--
-- Name: logflare_pub saved_searches; Type: PUBLICATION TABLE; Schema: _analytics; Owner: supabase_admin
--

ALTER PUBLICATION logflare_pub ADD TABLE ONLY _analytics.saved_searches;


--
-- Name: logflare_pub source_schemas; Type: PUBLICATION TABLE; Schema: _analytics; Owner: supabase_admin
--

ALTER PUBLICATION logflare_pub ADD TABLE ONLY _analytics.source_schemas;


--
-- Name: logflare_pub sources; Type: PUBLICATION TABLE; Schema: _analytics; Owner: supabase_admin
--

ALTER PUBLICATION logflare_pub ADD TABLE ONLY _analytics.sources;


--
-- Name: logflare_pub team_users; Type: PUBLICATION TABLE; Schema: _analytics; Owner: supabase_admin
--

ALTER PUBLICATION logflare_pub ADD TABLE ONLY _analytics.team_users;


--
-- Name: logflare_pub users; Type: PUBLICATION TABLE; Schema: _analytics; Owner: supabase_admin
--

ALTER PUBLICATION logflare_pub ADD TABLE ONLY _analytics.users;


--
-- PostgreSQL database dump complete
--

\unrestrict xJvMXxzqaJ7UXK2ez6Yd3dzFaJX1iKFj7P929Vy8xknfmaurud28HYPwvrFgjjM

--
-- Database "postgres" dump
--

\connect postgres

WARNING:  database "postgres" has a collation version mismatch
DETAIL:  The database was created using collation version 153.121, but the operating system provides version 153.128.
HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE postgres REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
pg_dump: error: query failed: ERROR:  cache lookup failed for relation 24929
pg_dump: detail: Query was: LOCK TABLE auth.users, auth.refresh_tokens, auth.instances, auth.audit_log_entries, auth.schema_migrations, supabase_functions.migrations, supabase_functions.hooks, _realtime.schema_migrations, _realtime.tenants, _realtime.extensions, realtime.schema_migrations, realtime.subscription, realtime.messages, storage.migrations, storage.buckets, storage.objects, storage.s3_multipart_uploads, storage.s3_multipart_uploads_parts, storage.buckets_analytics, storage.iceberg_namespaces, storage.iceberg_tables, storage.buckets_vectors, storage.vector_indexes, auth.identities, auth.sessions, auth.mfa_factors, auth.mfa_challenges, auth.mfa_amr_claims, auth.sso_providers, auth.sso_domains, auth.saml_providers, auth.saml_relay_states, auth.flow_state, auth.one_time_tokens, auth.oauth_clients, auth.oauth_authorizations, auth.oauth_consents, auth.oauth_client_states, public.subscriptions, public.financial_records, public.therapist_payouts, public.tenant_members, public.addon_credits, public.addon_products, public.addon_transactions, public.agenda_bloqueios, public.agenda_configuracoes, public.agenda_eventos, public.agenda_excecoes, public.agenda_online_slots, public.agenda_regras_semanais, public.agenda_slots_bloqueados_semanais, public.agenda_slots_regras, public.agendador_configuracoes, public.agendador_solicitacoes, public.billing_contracts, public.commitment_services, public.commitment_time_logs, public.company_profiles, public.determined_commitment_fields, public.determined_commitments, public.dev_user_credentials, public.email_layout_config, public.email_templates_global, public.email_templates_tenant, public.entitlements_invalidation, public.features, public.feriados, public.financial_categories, public.financial_exceptions, public.global_notices, public.insurance_plan_services, public.insurance_plans, public.login_carousel_slides, public.module_features, public.modules, public.notice_dismissals, public.notification_channels, public.notification_logs, public.notification_preferences, public.notification_queue, public.notification_schedules, public.notification_templates, public.notifications, public.plan_features, public.tenant_modules, public.owner_users, public.patient_discounts, public.patient_group_patient, public.patient_groups, public.patient_intake_requests, public.patient_invites, public.patient_patient_tag, public.patient_tags, public.patients, public.payment_settings, public.plan_prices, public.plan_public, public.plan_public_bullets, public.plans, public.professional_pricing, public.profiles, public.recurrence_exceptions, public.recurrence_rule_services, public.recurrence_rules, public.saas_admins, public.saas_doc_votos, public.saas_docs, public.saas_faq, public.saas_faq_itens, public.services, public.subscription_events, public.subscription_intents_personal, public.subscription_intents_tenant, public.subscription_intents_legacy, public.support_sessions, public.tenant_feature_exceptions_log, public.tenant_features, public.tenant_invites, public.tenants, public.therapist_payout_records, public.user_settings, public._db_migrations, realtime.messages_2026_03_27, realtime.messages_2026_03_28, public.twilio_subaccount_usage, realtime.messages_2026_03_29, realtime.messages_2026_03_30, realtime.messages_2026_03_31, public.patient_contacts, public.patient_status_history, public.patient_timeline, public.medicos, public.patient_support_contacts, realtime.messages_2026_04_01, public.documents, public.document_access_logs, public.document_signatures, public.document_share_links, public.document_templates, public.document_generated, realtime.messages_2026_04_02 IN ACCESS SHARE MODE
pg_dumpall: error: pg_dump failed on database "postgres", exiting
