From 4ec6edd472b833b483908f4c8efc347f9c3f891c Mon Sep 17 00:00:00 2001 From: ErikKaumk Date: Mon, 20 May 2024 17:24:29 +0300 Subject: [PATCH] make build work for preview url --- .../src/app/{ => (main)}/api/cli/page.tsx | 0 apps/docs/src/app/(main)/api/layout.tsx | 16 + .../app/{ => (main)}/api/status/pro/route.ts | 0 .../src/app/{ => (main)}/api/status/route.ts | 0 apps/docs/src/app/(main)/dashboard/page.tsx | 69 +- .../docs/src/components/Dashboard/Billing.tsx | 50 +- .../docs/src/components/Dashboard/General.tsx | 44 +- apps/docs/src/components/Dashboard/Team.tsx | 3 + apps/docs/src/components/ui/alert-dialog.tsx | 30 +- apps/docs/src/components/ui/button.tsx | 38 +- apps/docs/src/components/ui/card.tsx | 28 +- apps/docs/src/components/ui/dropdown-menu.tsx | 2 +- apps/docs/src/components/ui/table.tsx | 36 +- apps/docs/src/components/ui/toaster.tsx | 6 +- apps/docs/src/components/ui/use-toast.ts | 46 +- apps/docs/src/utils/useUser.tsx | 17 +- supabase/migrations/1680452567_name.sql | 945 ------------------ supabase/seed.sql | 20 - 18 files changed, 242 insertions(+), 1108 deletions(-) rename apps/docs/src/app/{ => (main)}/api/cli/page.tsx (100%) create mode 100644 apps/docs/src/app/(main)/api/layout.tsx rename apps/docs/src/app/{ => (main)}/api/status/pro/route.ts (100%) rename apps/docs/src/app/{ => (main)}/api/status/route.ts (100%) delete mode 100644 supabase/migrations/1680452567_name.sql delete mode 100644 supabase/seed.sql diff --git a/apps/docs/src/app/api/cli/page.tsx b/apps/docs/src/app/(main)/api/cli/page.tsx similarity index 100% rename from apps/docs/src/app/api/cli/page.tsx rename to apps/docs/src/app/(main)/api/cli/page.tsx diff --git a/apps/docs/src/app/(main)/api/layout.tsx b/apps/docs/src/app/(main)/api/layout.tsx new file mode 100644 index 000000000..a14e64fcd --- /dev/null +++ b/apps/docs/src/app/(main)/api/layout.tsx @@ -0,0 +1,16 @@ +export const metadata = { + title: 'Next.js', + description: 'Generated by Next.js', +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode +}) { + return ( + + {children} + + ) +} diff --git a/apps/docs/src/app/api/status/pro/route.ts b/apps/docs/src/app/(main)/api/status/pro/route.ts similarity index 100% rename from apps/docs/src/app/api/status/pro/route.ts rename to apps/docs/src/app/(main)/api/status/pro/route.ts diff --git a/apps/docs/src/app/api/status/route.ts b/apps/docs/src/app/(main)/api/status/route.ts similarity index 100% rename from apps/docs/src/app/api/status/route.ts rename to apps/docs/src/app/(main)/api/status/route.ts diff --git a/apps/docs/src/app/(main)/dashboard/page.tsx b/apps/docs/src/app/(main)/dashboard/page.tsx index e141ac37b..8375c3b8b 100644 --- a/apps/docs/src/app/(main)/dashboard/page.tsx +++ b/apps/docs/src/app/(main)/dashboard/page.tsx @@ -15,30 +15,41 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu' +import { useUser } from '@/utils/useUser' +import { User } from '@supabase/supabase-js' const menuLabels = ['General', 'Billing', 'Sandboxes', 'Team', 'Templates'] as const type MenuLabel = typeof menuLabels[number] export default function Dashboard() { - const [selectedItem, setSelectedItem] = useState('General') - - return ( -
- -
-

{selectedItem}

-
- + const { user, isLoading, error } = useUser() + const [selectedItem, setSelectedItem] = useState('Billing') + + if (error) { + return
Error: {error.message}
+ } + if (isLoading) { + return
Loading...
+ } + if (user) { + return ( +
+ +
+

{selectedItem}

+
+ +
-
- ) + ) + } } -const Sidebar = ({ selectedItem, setSelectedItem }) => ( +const Sidebar = ({ selectedItem, setSelectedItem, user }) => (
- + ) -const AccountSelectItem = () => { +const AccountSelectItem = ({ user }) => { + + const teams = user?.teams.map((team: any) => ({ + id: team.id, + name: team.name, + default: team.is_default, + })) + + const defaultTeam = teams?.find((teams: any) => teams.default) + return(
-

Default Team

-

Team account

+

{defaultTeam.name}

+ {/*

Team account

*/}
- -
- Personal Account - - Default Team - Other Team + {teams?.map((team: any) => ( + + {team.name} + + ))} @@ -112,14 +131,14 @@ const AccountSelectItem = () => { ) } -const MainContent = ({ selectedItem }: { selectedItem: MenuLabel }) => { +const MainContent = ({ selectedItem, user }: { selectedItem: MenuLabel, user: User }) => { switch (selectedItem) { case 'General': - return + return case 'Billing': return case 'Sandboxes': - return + return case 'Team': return case 'Templates': diff --git a/apps/docs/src/components/Dashboard/Billing.tsx b/apps/docs/src/components/Dashboard/Billing.tsx index 152950d3b..f7add0fce 100644 --- a/apps/docs/src/components/Dashboard/Billing.tsx +++ b/apps/docs/src/components/Dashboard/Billing.tsx @@ -1,12 +1,36 @@ import { ResponsiveBar } from '@nivo/bar' +import { useEffect, useState } from 'react' +import Link from 'next/link' +import { useUser } from '@/utils/useUser' +import { Button } from '../Button' +import { useUsage } from '@/utils/useUsage' + +function formatCurrency(value: number) { + return value.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 }) +} export const BillingContent = () => { + const { credits } = useUsage() + return (
+ {credits && ( +
+

Credits left

+ Credits automatically are used to bill your team + ${formatCurrency(credits)} +
+ )} +

Billing history

- + + +
+

Make changes to your billing

+ +
) } @@ -66,3 +90,27 @@ function BarChart(props: any) { } +const ManageBilling = () => { + const { user } = useUser() + const [url, setURL] = useState('') + + useEffect(function getBillingURL() { + if (!user) return + const u = `${process.env.NEXT_PUBLIC_STRIPE_BILLING_URL}?prefilled_email=${user.teams[0].email}` + setURL(u) + }, [user]) + + if (!user || !url) { + return null + } + + return ( + + ) +} + + diff --git a/apps/docs/src/components/Dashboard/General.tsx b/apps/docs/src/components/Dashboard/General.tsx index 0b1f33b1f..4749adfaf 100644 --- a/apps/docs/src/components/Dashboard/General.tsx +++ b/apps/docs/src/components/Dashboard/General.tsx @@ -17,29 +17,23 @@ import { AlertDialogTitle, AlertDialogTrigger, } from '@/components/ui/alert-dialog' +import { User } from '@supabase/supabase-js' +import { createPagesBrowserClient } from '@supabase/auth-helpers-nextjs' -const fakeApiKeys = [ - { - id: '1', - key: '3728621b-10ca-4153-99f5-e8b7080117f7', - createdAt: '2022-10-04T04:45:00.000Z', - updatedAt: '2022-10-04T04:45:00.000Z', - }, - { - id: '2', - key: '16eea788-3927-4501-b5c5-b3eeb170bc38', - createdAt: '2022-10-04T04:45:00.000Z', - updatedAt: '2022-10-04T04:45:00.000Z', - }, -] - -export const GeneralContent = () => { + +export const GeneralContent = ({user}: {user: User}) => { const { toast } = useToast() const [isDialogOpen, setIsDialogOpen] = useState(false) - const [apiKeys, setApiKeys] = useState(fakeApiKeys) const [currentKeyId, setCurrentKeyId] = useState(null) const [hoveredKeyId, setHoveredKeyId] = useState(null) + //@ts-ignore + const [apiKeys, setApiKeys] = useState<{ id: string, key: string, createdAt: string }[]>(user?.apiKeys.map((apiKey: any, index: any) => ({ + id: String(index + 1), + key: apiKey.api_key, + createdAt: apiKey.created_at, + })) || []) + const closeDialog = () => setIsDialogOpen(false) const openDialog = (id: string) => { setCurrentKeyId(id) @@ -51,8 +45,18 @@ export const GeneralContent = () => { closeDialog() } - const addApiKey = () => { - + const addApiKey = async() => { + const supabase = createPagesBrowserClient() + const res = await supabase + .from('team_api_keys') + .insert({ + team_id: user.id, + api_key: uuidv4(), + created_at: new Date().toISOString(), + }) + + console.log(res) + toast({ title: 'API key created', }) @@ -76,7 +80,7 @@ export const GeneralContent = () => { const maskApiKey = (key: string) => { const firstFour = key.slice(0, 4) const lastTwo = key.slice(-2) - const stars = '*'.repeat(key.length - 6) // Use '#' or another fixed-width character + const stars = '*'.repeat(key.length - 6) // use fixed-width character return `${firstFour}${stars}${lastTwo}` } diff --git a/apps/docs/src/components/Dashboard/Team.tsx b/apps/docs/src/components/Dashboard/Team.tsx index 39624d1ee..75349654a 100644 --- a/apps/docs/src/components/Dashboard/Team.tsx +++ b/apps/docs/src/components/Dashboard/Team.tsx @@ -36,6 +36,9 @@ export const TeamContent = () => { const [currentKeyId, setCurrentUserId] = useState(null) const [team, setTeam] = useState(fakeTeam) + // TODO: this logs just to make build work, remove it later + console.log(currentKeyId) + const closeDialog = () => setIsDialogOpen(false) const openDialog = (id: string) => { setCurrentUserId(id) diff --git a/apps/docs/src/components/ui/alert-dialog.tsx b/apps/docs/src/components/ui/alert-dialog.tsx index 25e7b4744..c5b9ebc1c 100644 --- a/apps/docs/src/components/ui/alert-dialog.tsx +++ b/apps/docs/src/components/ui/alert-dialog.tsx @@ -1,10 +1,10 @@ -"use client" +'use client' -import * as React from "react" -import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" +import * as React from 'react' +import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog' -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" +import { cn } from '@/lib/utils' +import { buttonVariants } from '@/components/ui/button' const AlertDialog = AlertDialogPrimitive.Root @@ -18,7 +18,7 @@ const AlertDialogOverlay = React.forwardRef< >(({ className, ...props }, ref) => ( ) => (
) -AlertDialogHeader.displayName = "AlertDialogHeader" +AlertDialogHeader.displayName = 'AlertDialogHeader' const AlertDialogFooter = ({ className, @@ -65,13 +65,13 @@ const AlertDialogFooter = ({ }: React.HTMLAttributes) => (
) -AlertDialogFooter.displayName = "AlertDialogFooter" +AlertDialogFooter.displayName = 'AlertDialogFooter' const AlertDialogTitle = React.forwardRef< React.ElementRef, @@ -79,7 +79,7 @@ const AlertDialogTitle = React.forwardRef< >(({ className, ...props }, ref) => ( )) @@ -91,7 +91,7 @@ const AlertDialogDescription = React.forwardRef< >(({ className, ...props }, ref) => ( )) @@ -117,8 +117,8 @@ const AlertDialogCancel = React.forwardRef< ( ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button" + const Comp = asChild ? Slot : 'button' return ( ( ) } ) -Button.displayName = "Button" +Button.displayName = 'Button' export { Button, buttonVariants } diff --git a/apps/docs/src/components/ui/card.tsx b/apps/docs/src/components/ui/card.tsx index afa13ecfa..4902b398b 100644 --- a/apps/docs/src/components/ui/card.tsx +++ b/apps/docs/src/components/ui/card.tsx @@ -1,6 +1,6 @@ -import * as React from "react" +import * as React from 'react' -import { cn } from "@/lib/utils" +import { cn } from '@/lib/utils' const Card = React.forwardRef< HTMLDivElement, @@ -9,13 +9,13 @@ const Card = React.forwardRef<
)) -Card.displayName = "Card" +Card.displayName = 'Card' const CardHeader = React.forwardRef< HTMLDivElement, @@ -23,11 +23,11 @@ const CardHeader = React.forwardRef< >(({ className, ...props }, ref) => (
)) -CardHeader.displayName = "CardHeader" +CardHeader.displayName = 'CardHeader' const CardTitle = React.forwardRef< HTMLParagraphElement, @@ -36,13 +36,13 @@ const CardTitle = React.forwardRef<

)) -CardTitle.displayName = "CardTitle" +CardTitle.displayName = 'CardTitle' const CardDescription = React.forwardRef< HTMLParagraphElement, @@ -50,19 +50,19 @@ const CardDescription = React.forwardRef< >(({ className, ...props }, ref) => (

)) -CardDescription.displayName = "CardDescription" +CardDescription.displayName = 'CardDescription' const CardContent = React.forwardRef< HTMLDivElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( -

+
)) -CardContent.displayName = "CardContent" +CardContent.displayName = 'CardContent' const CardFooter = React.forwardRef< HTMLDivElement, @@ -70,10 +70,10 @@ const CardFooter = React.forwardRef< >(({ className, ...props }, ref) => (
)) -CardFooter.displayName = "CardFooter" +CardFooter.displayName = 'CardFooter' export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } diff --git a/apps/docs/src/components/ui/dropdown-menu.tsx b/apps/docs/src/components/ui/dropdown-menu.tsx index 34d0f110c..57503b712 100644 --- a/apps/docs/src/components/ui/dropdown-menu.tsx +++ b/apps/docs/src/components/ui/dropdown-menu.tsx @@ -83,7 +83,7 @@ const DropdownMenuItem = React.forwardRef< )) -Table.displayName = "Table" +Table.displayName = 'Table' const TableHeader = React.forwardRef< HTMLTableSectionElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( - + )) -TableHeader.displayName = "TableHeader" +TableHeader.displayName = 'TableHeader' const TableBody = React.forwardRef< HTMLTableSectionElement, @@ -30,11 +30,11 @@ const TableBody = React.forwardRef< >(({ className, ...props }, ref) => ( )) -TableBody.displayName = "TableBody" +TableBody.displayName = 'TableBody' const TableFooter = React.forwardRef< HTMLTableSectionElement, @@ -43,13 +43,13 @@ const TableFooter = React.forwardRef< tr]:last:border-b-0", + 'border-t bg-muted/50 font-medium [&>tr]:last:border-b-0', className )} {...props} /> )) -TableFooter.displayName = "TableFooter" +TableFooter.displayName = 'TableFooter' const TableRow = React.forwardRef< HTMLTableRowElement, @@ -58,13 +58,13 @@ const TableRow = React.forwardRef< )) -TableRow.displayName = "TableRow" +TableRow.displayName = 'TableRow' const TableHead = React.forwardRef< HTMLTableCellElement, @@ -73,13 +73,13 @@ const TableHead = React.forwardRef<
)) -TableHead.displayName = "TableHead" +TableHead.displayName = 'TableHead' const TableCell = React.forwardRef< HTMLTableCellElement, @@ -87,11 +87,11 @@ const TableCell = React.forwardRef< >(({ className, ...props }, ref) => ( )) -TableCell.displayName = "TableCell" +TableCell.displayName = 'TableCell' const TableCaption = React.forwardRef< HTMLTableCaptionElement, @@ -99,11 +99,11 @@ const TableCaption = React.forwardRef< >(({ className, ...props }, ref) => (
)) -TableCaption.displayName = "TableCaption" +TableCaption.displayName = 'TableCaption' export { Table, diff --git a/apps/docs/src/components/ui/toaster.tsx b/apps/docs/src/components/ui/toaster.tsx index e2233852a..c8d9878a8 100644 --- a/apps/docs/src/components/ui/toaster.tsx +++ b/apps/docs/src/components/ui/toaster.tsx @@ -1,4 +1,4 @@ -"use client" +'use client' import { Toast, @@ -7,8 +7,8 @@ import { ToastProvider, ToastTitle, ToastViewport, -} from "@/components/ui/toast" -import { useToast } from "@/components/ui/use-toast" +} from '@/components/ui/toast' +import { useToast } from '@/components/ui/use-toast' export function Toaster() { const { toasts } = useToast() diff --git a/apps/docs/src/components/ui/use-toast.ts b/apps/docs/src/components/ui/use-toast.ts index 02e111d81..b4130ef30 100644 --- a/apps/docs/src/components/ui/use-toast.ts +++ b/apps/docs/src/components/ui/use-toast.ts @@ -1,12 +1,12 @@ -"use client" +'use client' // Inspired by react-hot-toast library -import * as React from "react" +import * as React from 'react' import type { ToastActionElement, ToastProps, -} from "@/components/ui/toast" +} from '@/components/ui/toast' const TOAST_LIMIT = 1 const TOAST_REMOVE_DELAY = 1000000 @@ -19,10 +19,10 @@ type ToasterToast = ToastProps & { } const actionTypes = { - ADD_TOAST: "ADD_TOAST", - UPDATE_TOAST: "UPDATE_TOAST", - DISMISS_TOAST: "DISMISS_TOAST", - REMOVE_TOAST: "REMOVE_TOAST", + ADD_TOAST: 'ADD_TOAST', + UPDATE_TOAST: 'UPDATE_TOAST', + DISMISS_TOAST: 'DISMISS_TOAST', + REMOVE_TOAST: 'REMOVE_TOAST', } as const let count = 0 @@ -36,20 +36,20 @@ type ActionType = typeof actionTypes type Action = | { - type: ActionType["ADD_TOAST"] + type: ActionType['ADD_TOAST'] toast: ToasterToast } | { - type: ActionType["UPDATE_TOAST"] + type: ActionType['UPDATE_TOAST'] toast: Partial } | { - type: ActionType["DISMISS_TOAST"] - toastId?: ToasterToast["id"] + type: ActionType['DISMISS_TOAST'] + toastId?: ToasterToast['id'] } | { - type: ActionType["REMOVE_TOAST"] - toastId?: ToasterToast["id"] + type: ActionType['REMOVE_TOAST'] + toastId?: ToasterToast['id'] } interface State { @@ -66,7 +66,7 @@ const addToRemoveQueue = (toastId: string) => { const timeout = setTimeout(() => { toastTimeouts.delete(toastId) dispatch({ - type: "REMOVE_TOAST", + type: 'REMOVE_TOAST', toastId: toastId, }) }, TOAST_REMOVE_DELAY) @@ -76,13 +76,13 @@ const addToRemoveQueue = (toastId: string) => { export const reducer = (state: State, action: Action): State => { switch (action.type) { - case "ADD_TOAST": + case 'ADD_TOAST': return { ...state, toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT), } - case "UPDATE_TOAST": + case 'UPDATE_TOAST': return { ...state, toasts: state.toasts.map((t) => @@ -90,7 +90,7 @@ export const reducer = (state: State, action: Action): State => { ), } - case "DISMISS_TOAST": { + case 'DISMISS_TOAST': { const { toastId } = action // ! Side effects ! - This could be extracted into a dismissToast() action, @@ -115,7 +115,7 @@ export const reducer = (state: State, action: Action): State => { ), } } - case "REMOVE_TOAST": + case 'REMOVE_TOAST': if (action.toastId === undefined) { return { ...state, @@ -140,20 +140,20 @@ function dispatch(action: Action) { }) } -type Toast = Omit +type Toast = Omit function toast({ ...props }: Toast) { const id = genId() const update = (props: ToasterToast) => dispatch({ - type: "UPDATE_TOAST", + type: 'UPDATE_TOAST', toast: { ...props, id }, }) - const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id }) + const dismiss = () => dispatch({ type: 'DISMISS_TOAST', toastId: id }) dispatch({ - type: "ADD_TOAST", + type: 'ADD_TOAST', toast: { ...props, id, @@ -187,7 +187,7 @@ function useToast() { return { ...state, toast, - dismiss: (toastId?: string) => dispatch({ type: "DISMISS_TOAST", toastId }), + dismiss: (toastId?: string) => dispatch({ type: 'DISMISS_TOAST', toastId }), } } diff --git a/apps/docs/src/utils/useUser.tsx b/apps/docs/src/utils/useUser.tsx index e845474de..1e61ed570 100644 --- a/apps/docs/src/utils/useUser.tsx +++ b/apps/docs/src/utils/useUser.tsx @@ -101,12 +101,21 @@ export const CustomUserContextProvider = (props) => { if (!session) return if (!session.user.id) return - // @ts-ignore - const { data: userTeams, teamsError } = await supabase + + const { data: userTeams } = await supabase .from('users_teams') - .select('teams (id, name, is_default, tier, email, team_billing (credit_card_added))') - .eq('user_id', session?.user.id) // Due to RLS, we could also safely just fetch all, but let's be explicit for sure + .select('teams (id, name, is_default, tier, email)') + .eq('user_id', session?.user.id) + // console.log('info', info) + + // @ts-ignore + // const { data: userTeams, teamsError } = await supabase + // .from('users_teams') + // .select('teams (id, name, is_default, tier, email, team_billing (credit_card_added))') + // .eq('user_id', session?.user.id) // Due to RLS, we could also safely just fetch all, but let's be explicit for sure + + const teamsError = null if (teamsError) Sentry.captureException(teamsError) // TODO: Adjust when user can be part of multiple teams // @ts-ignore diff --git a/supabase/migrations/1680452567_name.sql b/supabase/migrations/1680452567_name.sql deleted file mode 100644 index 24f54f34f..000000000 --- a/supabase/migrations/1680452567_name.sql +++ /dev/null @@ -1,945 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.1 --- Dumped by pg_dump version 15.1 (Debian 15.1-1.pgdg110+1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_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: pgsodium; Type: EXTENSION; Schema: -; Owner: - --- - -CREATE EXTENSION IF NOT EXISTS "pgsodium" WITH SCHEMA "pgsodium"; - - --- --- Name: pg_graphql; Type: EXTENSION; Schema: -; Owner: - --- - -CREATE EXTENSION IF NOT EXISTS "pg_graphql" WITH SCHEMA "graphql"; - - --- --- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: - --- - -CREATE EXTENSION IF NOT EXISTS "pg_stat_statements" WITH SCHEMA "extensions"; - - --- --- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner: - --- - -CREATE EXTENSION IF NOT EXISTS "pgcrypto" WITH SCHEMA "extensions"; - - --- --- Name: pgjwt; Type: EXTENSION; Schema: -; Owner: - --- - -CREATE EXTENSION IF NOT EXISTS "pgjwt" WITH SCHEMA "extensions"; - - --- --- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: - --- - -CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA "extensions"; - - --- --- Name: deployment_state; Type: TYPE; Schema: public; Owner: postgres --- - -CREATE TYPE "public"."deployment_state" AS ENUM ( - 'generating', - 'deploying', - 'finished', - 'error' -); - - -ALTER TYPE "public"."deployment_state" OWNER TO "postgres"; - -SET default_tablespace = ''; - -SET default_table_access_method = "heap"; - --- --- Name: deployments; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE "public"."deployments" ( - "id" "uuid" DEFAULT "extensions"."uuid_generate_v4"() NOT NULL, - "created_at" timestamp with time zone DEFAULT "now"() NOT NULL, - "logs" "jsonb"[], - "project_id" "text" NOT NULL, - "route_id" "text", - "state" "public"."deployment_state", - "url" "text", - "logs_raw" "text" DEFAULT ''::"text", - "config" "jsonb", - "enabled" boolean DEFAULT false NOT NULL -); - -ALTER TABLE ONLY "public"."deployments" REPLICA IDENTITY FULL; - - -ALTER TABLE "public"."deployments" OWNER TO "postgres"; - --- --- Name: projects; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE "public"."projects" ( - "id" "text" DEFAULT ''::"text" NOT NULL, - "created_at" timestamp with time zone DEFAULT "now"() NOT NULL, - "data" "jsonb", - "team_id" "uuid" NOT NULL, - "name" "text" DEFAULT ''::"text" NOT NULL, - "development_logs" "jsonb"[] -); - - -ALTER TABLE "public"."projects" OWNER TO "postgres"; - --- --- Name: teams; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE "public"."teams" ( - "id" "uuid" DEFAULT "extensions"."uuid_generate_v4"() NOT NULL, - "created_at" timestamp with time zone DEFAULT "now"() NOT NULL, - "is_default" boolean, - "name" "text" DEFAULT ''::"text" NOT NULL -); - - -ALTER TABLE "public"."teams" OWNER TO "postgres"; - --- --- Name: users_teams; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE "public"."users_teams" ( - "user_id" "uuid" NOT NULL, - "created_at" timestamp with time zone DEFAULT "now"() NOT NULL, - "team_id" "uuid" NOT NULL -); - - -ALTER TABLE "public"."users_teams" OWNER TO "postgres"; - --- --- Name: projects ai_api_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY "public"."projects" - ADD CONSTRAINT "ai_api_pkey" PRIMARY KEY ("id"); - - --- --- Name: deployments deployments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY "public"."deployments" - ADD CONSTRAINT "deployments_pkey" PRIMARY KEY ("id"); - - --- --- Name: teams teams_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY "public"."teams" - ADD CONSTRAINT "teams_pkey" PRIMARY KEY ("id"); - - --- --- Name: users_teams users_teams_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY "public"."users_teams" - ADD CONSTRAINT "users_teams_pkey" PRIMARY KEY ("user_id", "team_id"); - - --- --- Name: deployments deployments_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY "public"."deployments" - ADD CONSTRAINT "deployments_project_id_fkey" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id"); - - --- --- Name: projects projects_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY "public"."projects" - ADD CONSTRAINT "projects_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "public"."teams"("id"); - - --- --- Name: users_teams users_teams_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY "public"."users_teams" - ADD CONSTRAINT "users_teams_team_id_fkey" FOREIGN KEY ("team_id") REFERENCES "public"."teams"("id"); - - --- --- Name: users_teams users_teams_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY "public"."users_teams" - ADD CONSTRAINT "users_teams_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "auth"."users"("id"); - - --- --- Name: teams; Type: ROW SECURITY; Schema: public; Owner: postgres --- - -ALTER TABLE "public"."teams" ENABLE ROW LEVEL SECURITY; - --- --- Name: users_teams; Type: ROW SECURITY; Schema: public; Owner: postgres --- - -ALTER TABLE "public"."users_teams" ENABLE ROW LEVEL SECURITY; - --- --- Name: SCHEMA "public"; Type: ACL; Schema: -; Owner: pg_database_owner --- - -GRANT USAGE ON SCHEMA "public" TO "postgres"; -GRANT USAGE ON SCHEMA "public" TO "anon"; -GRANT USAGE ON SCHEMA "public" TO "authenticated"; -GRANT USAGE ON SCHEMA "public" TO "service_role"; - - --- --- Name: FUNCTION "algorithm_sign"("signables" "text", "secret" "text", "algorithm" "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."algorithm_sign"("signables" "text", "secret" "text", "algorithm" "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."algorithm_sign"("signables" "text", "secret" "text", "algorithm" "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."algorithm_sign"("signables" "text", "secret" "text", "algorithm" "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "armor"("bytea"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."armor"("bytea") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."armor"("bytea") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."armor"("bytea") TO "dashboard_user"; - - --- --- Name: FUNCTION "armor"("bytea", "text"[], "text"[]); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."armor"("bytea", "text"[], "text"[]) FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."armor"("bytea", "text"[], "text"[]) TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."armor"("bytea", "text"[], "text"[]) TO "dashboard_user"; - - --- --- Name: FUNCTION "crypt"("text", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."crypt"("text", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."crypt"("text", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."crypt"("text", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "dearmor"("text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."dearmor"("text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."dearmor"("text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."dearmor"("text") TO "dashboard_user"; - - --- --- Name: FUNCTION "decrypt"("bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."decrypt"("bytea", "bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."decrypt"("bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."decrypt"("bytea", "bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "decrypt_iv"("bytea", "bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."decrypt_iv"("bytea", "bytea", "bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."decrypt_iv"("bytea", "bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."decrypt_iv"("bytea", "bytea", "bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "digest"("bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."digest"("bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."digest"("bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."digest"("bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "digest"("text", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."digest"("text", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."digest"("text", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."digest"("text", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "encrypt"("bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."encrypt"("bytea", "bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."encrypt"("bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."encrypt"("bytea", "bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "encrypt_iv"("bytea", "bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."encrypt_iv"("bytea", "bytea", "bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."encrypt_iv"("bytea", "bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."encrypt_iv"("bytea", "bytea", "bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "gen_random_bytes"(integer); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."gen_random_bytes"(integer) FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."gen_random_bytes"(integer) TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."gen_random_bytes"(integer) TO "dashboard_user"; - - --- --- Name: FUNCTION "gen_random_uuid"(); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."gen_random_uuid"() FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."gen_random_uuid"() TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."gen_random_uuid"() TO "dashboard_user"; - - --- --- Name: FUNCTION "gen_salt"("text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."gen_salt"("text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."gen_salt"("text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."gen_salt"("text") TO "dashboard_user"; - - --- --- Name: FUNCTION "gen_salt"("text", integer); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."gen_salt"("text", integer) FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."gen_salt"("text", integer) TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."gen_salt"("text", integer) TO "dashboard_user"; - - --- --- Name: FUNCTION "hmac"("bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."hmac"("bytea", "bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."hmac"("bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."hmac"("bytea", "bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "hmac"("text", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."hmac"("text", "text", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."hmac"("text", "text", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."hmac"("text", "text", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pg_stat_statements"("showtext" boolean, OUT "userid" "oid", OUT "dbid" "oid", OUT "toplevel" boolean, OUT "queryid" bigint, OUT "query" "text", OUT "plans" bigint, OUT "total_plan_time" double precision, OUT "min_plan_time" double precision, OUT "max_plan_time" double precision, OUT "mean_plan_time" double precision, OUT "stddev_plan_time" double precision, OUT "calls" bigint, OUT "total_exec_time" double precision, OUT "min_exec_time" double precision, OUT "max_exec_time" double precision, OUT "mean_exec_time" double precision, OUT "stddev_exec_time" double precision, OUT "rows" bigint, OUT "shared_blks_hit" bigint, OUT "shared_blks_read" bigint, OUT "shared_blks_dirtied" bigint, OUT "shared_blks_written" bigint, OUT "local_blks_hit" bigint, OUT "local_blks_read" bigint, OUT "local_blks_dirtied" bigint, OUT "local_blks_written" bigint, OUT "temp_blks_read" bigint, OUT "temp_blks_written" bigint, OUT "blk_read_time" double precision, OUT "blk_write_time" double precision, OUT "temp_blk_read_time" double precision, OUT "temp_blk_write_time" double precision, OUT "wal_records" bigint, OUT "wal_fpi" bigint, OUT "wal_bytes" numeric, OUT "jit_functions" bigint, OUT "jit_generation_time" double precision, OUT "jit_inlining_count" bigint, OUT "jit_inlining_time" double precision, OUT "jit_optimization_count" bigint, OUT "jit_optimization_time" double precision, OUT "jit_emission_count" bigint, OUT "jit_emission_time" double precision); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pg_stat_statements"("showtext" boolean, OUT "userid" "oid", OUT "dbid" "oid", OUT "toplevel" boolean, OUT "queryid" bigint, OUT "query" "text", OUT "plans" bigint, OUT "total_plan_time" double precision, OUT "min_plan_time" double precision, OUT "max_plan_time" double precision, OUT "mean_plan_time" double precision, OUT "stddev_plan_time" double precision, OUT "calls" bigint, OUT "total_exec_time" double precision, OUT "min_exec_time" double precision, OUT "max_exec_time" double precision, OUT "mean_exec_time" double precision, OUT "stddev_exec_time" double precision, OUT "rows" bigint, OUT "shared_blks_hit" bigint, OUT "shared_blks_read" bigint, OUT "shared_blks_dirtied" bigint, OUT "shared_blks_written" bigint, OUT "local_blks_hit" bigint, OUT "local_blks_read" bigint, OUT "local_blks_dirtied" bigint, OUT "local_blks_written" bigint, OUT "temp_blks_read" bigint, OUT "temp_blks_written" bigint, OUT "blk_read_time" double precision, OUT "blk_write_time" double precision, OUT "temp_blk_read_time" double precision, OUT "temp_blk_write_time" double precision, OUT "wal_records" bigint, OUT "wal_fpi" bigint, OUT "wal_bytes" numeric, OUT "jit_functions" bigint, OUT "jit_generation_time" double precision, OUT "jit_inlining_count" bigint, OUT "jit_inlining_time" double precision, OUT "jit_optimization_count" bigint, OUT "jit_optimization_time" double precision, OUT "jit_emission_count" bigint, OUT "jit_emission_time" double precision) FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pg_stat_statements"("showtext" boolean, OUT "userid" "oid", OUT "dbid" "oid", OUT "toplevel" boolean, OUT "queryid" bigint, OUT "query" "text", OUT "plans" bigint, OUT "total_plan_time" double precision, OUT "min_plan_time" double precision, OUT "max_plan_time" double precision, OUT "mean_plan_time" double precision, OUT "stddev_plan_time" double precision, OUT "calls" bigint, OUT "total_exec_time" double precision, OUT "min_exec_time" double precision, OUT "max_exec_time" double precision, OUT "mean_exec_time" double precision, OUT "stddev_exec_time" double precision, OUT "rows" bigint, OUT "shared_blks_hit" bigint, OUT "shared_blks_read" bigint, OUT "shared_blks_dirtied" bigint, OUT "shared_blks_written" bigint, OUT "local_blks_hit" bigint, OUT "local_blks_read" bigint, OUT "local_blks_dirtied" bigint, OUT "local_blks_written" bigint, OUT "temp_blks_read" bigint, OUT "temp_blks_written" bigint, OUT "blk_read_time" double precision, OUT "blk_write_time" double precision, OUT "temp_blk_read_time" double precision, OUT "temp_blk_write_time" double precision, OUT "wal_records" bigint, OUT "wal_fpi" bigint, OUT "wal_bytes" numeric, OUT "jit_functions" bigint, OUT "jit_generation_time" double precision, OUT "jit_inlining_count" bigint, OUT "jit_inlining_time" double precision, OUT "jit_optimization_count" bigint, OUT "jit_optimization_time" double precision, OUT "jit_emission_count" bigint, OUT "jit_emission_time" double precision) TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pg_stat_statements"("showtext" boolean, OUT "userid" "oid", OUT "dbid" "oid", OUT "toplevel" boolean, OUT "queryid" bigint, OUT "query" "text", OUT "plans" bigint, OUT "total_plan_time" double precision, OUT "min_plan_time" double precision, OUT "max_plan_time" double precision, OUT "mean_plan_time" double precision, OUT "stddev_plan_time" double precision, OUT "calls" bigint, OUT "total_exec_time" double precision, OUT "min_exec_time" double precision, OUT "max_exec_time" double precision, OUT "mean_exec_time" double precision, OUT "stddev_exec_time" double precision, OUT "rows" bigint, OUT "shared_blks_hit" bigint, OUT "shared_blks_read" bigint, OUT "shared_blks_dirtied" bigint, OUT "shared_blks_written" bigint, OUT "local_blks_hit" bigint, OUT "local_blks_read" bigint, OUT "local_blks_dirtied" bigint, OUT "local_blks_written" bigint, OUT "temp_blks_read" bigint, OUT "temp_blks_written" bigint, OUT "blk_read_time" double precision, OUT "blk_write_time" double precision, OUT "temp_blk_read_time" double precision, OUT "temp_blk_write_time" double precision, OUT "wal_records" bigint, OUT "wal_fpi" bigint, OUT "wal_bytes" numeric, OUT "jit_functions" bigint, OUT "jit_generation_time" double precision, OUT "jit_inlining_count" bigint, OUT "jit_inlining_time" double precision, OUT "jit_optimization_count" bigint, OUT "jit_optimization_time" double precision, OUT "jit_emission_count" bigint, OUT "jit_emission_time" double precision) TO "dashboard_user"; - - --- --- Name: FUNCTION "pg_stat_statements_info"(OUT "dealloc" bigint, OUT "stats_reset" timestamp with time zone); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pg_stat_statements_info"(OUT "dealloc" bigint, OUT "stats_reset" timestamp with time zone) FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pg_stat_statements_info"(OUT "dealloc" bigint, OUT "stats_reset" timestamp with time zone) TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pg_stat_statements_info"(OUT "dealloc" bigint, OUT "stats_reset" timestamp with time zone) TO "dashboard_user"; - - --- --- Name: FUNCTION "pg_stat_statements_reset"("userid" "oid", "dbid" "oid", "queryid" bigint); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pg_stat_statements_reset"("userid" "oid", "dbid" "oid", "queryid" bigint) FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pg_stat_statements_reset"("userid" "oid", "dbid" "oid", "queryid" bigint) TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pg_stat_statements_reset"("userid" "oid", "dbid" "oid", "queryid" bigint) TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_armor_headers"("text", OUT "key" "text", OUT "value" "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_armor_headers"("text", OUT "key" "text", OUT "value" "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_armor_headers"("text", OUT "key" "text", OUT "value" "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_armor_headers"("text", OUT "key" "text", OUT "value" "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_key_id"("bytea"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_key_id"("bytea") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_key_id"("bytea") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_key_id"("bytea") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_pub_decrypt"("bytea", "bytea"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_pub_decrypt"("bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_pub_decrypt"("bytea", "bytea", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea", "text", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea", "text", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt"("bytea", "bytea", "text", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_pub_decrypt_bytea"("bytea", "bytea"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_pub_decrypt_bytea"("bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_pub_decrypt_bytea"("bytea", "bytea", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea", "text", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea", "text", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_decrypt_bytea"("bytea", "bytea", "text", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_pub_encrypt"("text", "bytea"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_encrypt"("text", "bytea") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt"("text", "bytea") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt"("text", "bytea") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_pub_encrypt"("text", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_encrypt"("text", "bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt"("text", "bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt"("text", "bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_pub_encrypt_bytea"("bytea", "bytea"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_encrypt_bytea"("bytea", "bytea") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt_bytea"("bytea", "bytea") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt_bytea"("bytea", "bytea") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_pub_encrypt_bytea"("bytea", "bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_pub_encrypt_bytea"("bytea", "bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt_bytea"("bytea", "bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_pub_encrypt_bytea"("bytea", "bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_sym_decrypt"("bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_decrypt"("bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt"("bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt"("bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_sym_decrypt"("bytea", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_decrypt"("bytea", "text", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt"("bytea", "text", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt"("bytea", "text", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_sym_decrypt_bytea"("bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_decrypt_bytea"("bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt_bytea"("bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt_bytea"("bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_sym_decrypt_bytea"("bytea", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_decrypt_bytea"("bytea", "text", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt_bytea"("bytea", "text", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_decrypt_bytea"("bytea", "text", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_sym_encrypt"("text", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_encrypt"("text", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt"("text", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt"("text", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_sym_encrypt"("text", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_encrypt"("text", "text", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt"("text", "text", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt"("text", "text", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_sym_encrypt_bytea"("bytea", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_encrypt_bytea"("bytea", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt_bytea"("bytea", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt_bytea"("bytea", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "pgp_sym_encrypt_bytea"("bytea", "text", "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."pgp_sym_encrypt_bytea"("bytea", "text", "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt_bytea"("bytea", "text", "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."pgp_sym_encrypt_bytea"("bytea", "text", "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "sign"("payload" "json", "secret" "text", "algorithm" "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."sign"("payload" "json", "secret" "text", "algorithm" "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."sign"("payload" "json", "secret" "text", "algorithm" "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."sign"("payload" "json", "secret" "text", "algorithm" "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "try_cast_double"("inp" "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."try_cast_double"("inp" "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."try_cast_double"("inp" "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."try_cast_double"("inp" "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "url_decode"("data" "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."url_decode"("data" "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."url_decode"("data" "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."url_decode"("data" "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "url_encode"("data" "bytea"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."url_encode"("data" "bytea") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."url_encode"("data" "bytea") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."url_encode"("data" "bytea") TO "dashboard_user"; - - --- --- Name: FUNCTION "uuid_generate_v1"(); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."uuid_generate_v1"() FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v1"() TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v1"() TO "dashboard_user"; - - --- --- Name: FUNCTION "uuid_generate_v1mc"(); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."uuid_generate_v1mc"() FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v1mc"() TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v1mc"() TO "dashboard_user"; - - --- --- Name: FUNCTION "uuid_generate_v3"("namespace" "uuid", "name" "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."uuid_generate_v3"("namespace" "uuid", "name" "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v3"("namespace" "uuid", "name" "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v3"("namespace" "uuid", "name" "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "uuid_generate_v4"(); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."uuid_generate_v4"() FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v4"() TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v4"() TO "dashboard_user"; - - --- --- Name: FUNCTION "uuid_generate_v5"("namespace" "uuid", "name" "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."uuid_generate_v5"("namespace" "uuid", "name" "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v5"("namespace" "uuid", "name" "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."uuid_generate_v5"("namespace" "uuid", "name" "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "uuid_nil"(); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."uuid_nil"() FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."uuid_nil"() TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."uuid_nil"() TO "dashboard_user"; - - --- --- Name: FUNCTION "uuid_ns_dns"(); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."uuid_ns_dns"() FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."uuid_ns_dns"() TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."uuid_ns_dns"() TO "dashboard_user"; - - --- --- Name: FUNCTION "uuid_ns_oid"(); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."uuid_ns_oid"() FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."uuid_ns_oid"() TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."uuid_ns_oid"() TO "dashboard_user"; - - --- --- Name: FUNCTION "uuid_ns_url"(); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."uuid_ns_url"() FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."uuid_ns_url"() TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."uuid_ns_url"() TO "dashboard_user"; - - --- --- Name: FUNCTION "uuid_ns_x500"(); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."uuid_ns_x500"() FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."uuid_ns_x500"() TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."uuid_ns_x500"() TO "dashboard_user"; - - --- --- Name: FUNCTION "verify"("token" "text", "secret" "text", "algorithm" "text"); Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON FUNCTION "extensions"."verify"("token" "text", "secret" "text", "algorithm" "text") FROM "postgres"; --- GRANT ALL ON FUNCTION "extensions"."verify"("token" "text", "secret" "text", "algorithm" "text") TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON FUNCTION "extensions"."verify"("token" "text", "secret" "text", "algorithm" "text") TO "dashboard_user"; - - --- --- Name: FUNCTION "comment_directive"("comment_" "text"); Type: ACL; Schema: graphql; Owner: supabase_admin --- - --- GRANT ALL ON FUNCTION "graphql"."comment_directive"("comment_" "text") TO "postgres"; --- GRANT ALL ON FUNCTION "graphql"."comment_directive"("comment_" "text") TO "anon"; --- GRANT ALL ON FUNCTION "graphql"."comment_directive"("comment_" "text") TO "authenticated"; --- GRANT ALL ON FUNCTION "graphql"."comment_directive"("comment_" "text") TO "service_role"; - - --- --- Name: FUNCTION "exception"("message" "text"); Type: ACL; Schema: graphql; Owner: supabase_admin --- - --- GRANT ALL ON FUNCTION "graphql"."exception"("message" "text") TO "postgres"; --- GRANT ALL ON FUNCTION "graphql"."exception"("message" "text") TO "anon"; --- GRANT ALL ON FUNCTION "graphql"."exception"("message" "text") TO "authenticated"; --- GRANT ALL ON FUNCTION "graphql"."exception"("message" "text") TO "service_role"; - - --- --- Name: FUNCTION "get_schema_version"(); Type: ACL; Schema: graphql; Owner: supabase_admin --- - --- GRANT ALL ON FUNCTION "graphql"."get_schema_version"() TO "postgres"; --- GRANT ALL ON FUNCTION "graphql"."get_schema_version"() TO "anon"; --- GRANT ALL ON FUNCTION "graphql"."get_schema_version"() TO "authenticated"; --- GRANT ALL ON FUNCTION "graphql"."get_schema_version"() TO "service_role"; - - --- --- Name: FUNCTION "increment_schema_version"(); Type: ACL; Schema: graphql; Owner: supabase_admin --- - --- GRANT ALL ON FUNCTION "graphql"."increment_schema_version"() TO "postgres"; --- GRANT ALL ON FUNCTION "graphql"."increment_schema_version"() TO "anon"; --- GRANT ALL ON FUNCTION "graphql"."increment_schema_version"() TO "authenticated"; --- GRANT ALL ON FUNCTION "graphql"."increment_schema_version"() TO "service_role"; - - --- --- Name: FUNCTION "graphql"("operationName" "text", "query" "text", "variables" "jsonb", "extensions" "jsonb"); Type: ACL; Schema: graphql_public; Owner: supabase_admin --- - --- GRANT ALL ON FUNCTION "graphql_public"."graphql"("operationName" "text", "query" "text", "variables" "jsonb", "extensions" "jsonb") TO "postgres"; --- GRANT ALL ON FUNCTION "graphql_public"."graphql"("operationName" "text", "query" "text", "variables" "jsonb", "extensions" "jsonb") TO "anon"; --- GRANT ALL ON FUNCTION "graphql_public"."graphql"("operationName" "text", "query" "text", "variables" "jsonb", "extensions" "jsonb") TO "authenticated"; --- GRANT ALL ON FUNCTION "graphql_public"."graphql"("operationName" "text", "query" "text", "variables" "jsonb", "extensions" "jsonb") TO "service_role"; - - --- --- Name: FUNCTION "crypto_aead_det_decrypt"("message" "bytea", "additional" "bytea", "key_uuid" "uuid", "nonce" "bytea"); Type: ACL; Schema: pgsodium; Owner: pgsodium_keymaker --- - --- GRANT ALL ON FUNCTION "pgsodium"."crypto_aead_det_decrypt"("message" "bytea", "additional" "bytea", "key_uuid" "uuid", "nonce" "bytea") TO "service_role"; - - --- --- Name: FUNCTION "crypto_aead_det_encrypt"("message" "bytea", "additional" "bytea", "key_uuid" "uuid", "nonce" "bytea"); Type: ACL; Schema: pgsodium; Owner: pgsodium_keymaker --- - --- GRANT ALL ON FUNCTION "pgsodium"."crypto_aead_det_encrypt"("message" "bytea", "additional" "bytea", "key_uuid" "uuid", "nonce" "bytea") TO "service_role"; - - --- --- Name: FUNCTION "crypto_aead_det_keygen"(); Type: ACL; Schema: pgsodium; Owner: supabase_admin --- - --- GRANT ALL ON FUNCTION "pgsodium"."crypto_aead_det_keygen"() TO "service_role"; - - --- --- Name: TABLE "pg_stat_statements"; Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON TABLE "extensions"."pg_stat_statements" FROM "postgres"; --- GRANT ALL ON TABLE "extensions"."pg_stat_statements" TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON TABLE "extensions"."pg_stat_statements" TO "dashboard_user"; - - --- --- Name: TABLE "pg_stat_statements_info"; Type: ACL; Schema: extensions; Owner: postgres --- - --- REVOKE ALL ON TABLE "extensions"."pg_stat_statements_info" FROM "postgres"; --- GRANT ALL ON TABLE "extensions"."pg_stat_statements_info" TO "postgres" WITH GRANT OPTION; --- GRANT ALL ON TABLE "extensions"."pg_stat_statements_info" TO "dashboard_user"; - - --- --- Name: SEQUENCE "seq_schema_version"; Type: ACL; Schema: graphql; Owner: supabase_admin --- - --- GRANT ALL ON SEQUENCE "graphql"."seq_schema_version" TO "postgres"; --- GRANT ALL ON SEQUENCE "graphql"."seq_schema_version" TO "anon"; --- GRANT ALL ON SEQUENCE "graphql"."seq_schema_version" TO "authenticated"; --- GRANT ALL ON SEQUENCE "graphql"."seq_schema_version" TO "service_role"; - - --- --- Name: TABLE "decrypted_key"; Type: ACL; Schema: pgsodium; Owner: supabase_admin --- - --- GRANT ALL ON TABLE "pgsodium"."decrypted_key" TO "pgsodium_keyholder"; - - --- --- Name: TABLE "masking_rule"; Type: ACL; Schema: pgsodium; Owner: supabase_admin --- - --- GRANT ALL ON TABLE "pgsodium"."masking_rule" TO "pgsodium_keyholder"; - - --- --- Name: TABLE "mask_columns"; Type: ACL; Schema: pgsodium; Owner: supabase_admin --- - --- GRANT ALL ON TABLE "pgsodium"."mask_columns" TO "pgsodium_keyholder"; - - --- --- Name: TABLE "deployments"; Type: ACL; Schema: public; Owner: postgres --- - -GRANT ALL ON TABLE "public"."deployments" TO "anon"; -GRANT ALL ON TABLE "public"."deployments" TO "authenticated"; -GRANT ALL ON TABLE "public"."deployments" TO "service_role"; - - --- --- Name: TABLE "projects"; Type: ACL; Schema: public; Owner: postgres --- - -GRANT ALL ON TABLE "public"."projects" TO "anon"; -GRANT ALL ON TABLE "public"."projects" TO "authenticated"; -GRANT ALL ON TABLE "public"."projects" TO "service_role"; - - --- --- Name: TABLE "teams"; Type: ACL; Schema: public; Owner: postgres --- - -GRANT ALL ON TABLE "public"."teams" TO "anon"; -GRANT ALL ON TABLE "public"."teams" TO "authenticated"; -GRANT ALL ON TABLE "public"."teams" TO "service_role"; - - --- --- Name: TABLE "users_teams"; Type: ACL; Schema: public; Owner: postgres --- - -GRANT ALL ON TABLE "public"."users_teams" TO "anon"; -GRANT ALL ON TABLE "public"."users_teams" TO "authenticated"; -GRANT ALL ON TABLE "public"."users_teams" TO "service_role"; - - --- --- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: public; Owner: postgres --- - -ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "postgres"; -ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "anon"; -ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "authenticated"; -ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "service_role"; - - --- --- Name: DEFAULT PRIVILEGES FOR SEQUENCES; Type: DEFAULT ACL; Schema: public; Owner: supabase_admin --- - --- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "postgres"; --- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "anon"; --- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "authenticated"; --- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "service_role"; - - --- --- Name: DEFAULT PRIVILEGES FOR FUNCTIONS; Type: DEFAULT ACL; Schema: public; Owner: postgres --- - -ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "postgres"; -ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "anon"; -ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "authenticated"; -ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "service_role"; - - --- --- Name: DEFAULT PRIVILEGES FOR FUNCTIONS; Type: DEFAULT ACL; Schema: public; Owner: supabase_admin --- - --- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "postgres"; --- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "anon"; --- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "authenticated"; --- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "service_role"; - - --- --- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: public; Owner: postgres --- - -ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "postgres"; -ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "anon"; -ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "authenticated"; -ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "service_role"; - - --- --- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: public; Owner: supabase_admin --- - --- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON TABLES TO "postgres"; --- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON TABLES TO "anon"; --- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON TABLES TO "authenticated"; --- ALTER DEFAULT PRIVILEGES FOR ROLE "supabase_admin" IN SCHEMA "public" GRANT ALL ON TABLES TO "service_role"; - - --- --- PostgreSQL database dump complete --- - -RESET ALL; diff --git a/supabase/seed.sql b/supabase/seed.sql deleted file mode 100644 index 81d49c4d6..000000000 --- a/supabase/seed.sql +++ /dev/null @@ -1,20 +0,0 @@ --- --- Add default user and project --- - -INSERT INTO auth.users (instance_id, id, aud, role, email, encrypted_password, email_confirmed_at, invited_at, confirmation_token, confirmation_sent_at, recovery_token, recovery_sent_at, email_change_token_new, email_change, email_change_sent_at, last_sign_in_at, raw_app_meta_data, raw_user_meta_data, is_super_admin, created_at, updated_at, phone, phone_confirmed_at, phone_change, phone_change_token, phone_change_sent_at, email_change_token_current, email_change_confirm_status, banned_until, reauthentication_token, reauthentication_sent_at) -VALUES - ('00000000-0000-0000-0000-000000000000', '5899f99d-a449-4bfa-8769-19c097aaf1f5', 'authenticated', 'authenticated', 'admin@admin.com', '$2a$10$yLZXHGHl7mgJ.Ax3cBhQ6uJ77CBuqTkt3EnF2hj26KAgMuBPUWekS', '2022-10-04 03:41:27.39308+00', NULL, '', NULL, '', NULL, '', '', NULL, NULL, '{"provider": "email", "providers": ["email"]}', '{}', NULL, '2022-10-04 03:41:27.391146+00', '2022-10-04 03:41:27.39308+00', NULL, NULL, '', '', NULL, '', 0, NULL, '', NULL); - -INSERT INTO auth.identities (id,user_id,identity_data,provider,last_sign_in_at,created_at,updated_at) -VALUES - ('5899f99d-a449-4bfa-8769-19c097aaf1f5', '5899f99d-a449-4bfa-8769-19c097aaf1f5'::uuid, '{"sub": "5899f99d-a449-4bfa-8769-19c097aaf1f5"}', 'email', '2022-10-04 04:45:00.000+00', '2022-10-04 03:41:27.391146+00', '2022-10-04 03:41:27.39308+00'); - -INSERT INTO "public"."teams" (id, created_at, name, is_default) - VALUES ('21d2e330-95fa-4b78-b677-47d0713de3da', NOW(), 'admin@admin.com', true); - -INSERT INTO "public"."users_teams" (user_id, created_at, team_id) -VALUES ('5899f99d-a449-4bfa-8769-19c097aaf1f5', NOW(), '21d2e330-95fa-4b78-b677-47d0713de3da'); - --- INSERT INTO "public"."projects" (id, created_at, data, team_id, name) --- VALUES ('default_project', NOW(), '{}', '21d2e330-95fa-4b78-b677-47d0713de3da', 'Default Project');