Skip to content

Commit 88cc5ab

Browse files
committed
Fixing Seed
1 parent 03c1103 commit 88cc5ab

File tree

2 files changed

+620
-500
lines changed

2 files changed

+620
-500
lines changed
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
2+
SET statement_timeout = 0;
3+
SET lock_timeout = 0;
4+
SET idle_in_transaction_session_timeout = 0;
5+
SET client_encoding = 'UTF8';
6+
SET standard_conforming_strings = on;
7+
SELECT pg_catalog.set_config('search_path', '', false);
8+
SET check_function_bodies = false;
9+
SET xmloption = content;
10+
SET client_min_messages = warning;
11+
SET row_security = off;
12+
13+
CREATE EXTENSION IF NOT EXISTS "pgsodium" WITH SCHEMA "pgsodium";
14+
15+
COMMENT ON SCHEMA "public" IS 'standard public schema';
16+
17+
CREATE EXTENSION IF NOT EXISTS "pg_graphql" WITH SCHEMA "graphql";
18+
19+
CREATE EXTENSION IF NOT EXISTS "pg_stat_statements" WITH SCHEMA "extensions";
20+
21+
CREATE EXTENSION IF NOT EXISTS "pgcrypto" WITH SCHEMA "extensions";
22+
23+
CREATE EXTENSION IF NOT EXISTS "pgjwt" WITH SCHEMA "extensions";
24+
25+
CREATE EXTENSION IF NOT EXISTS "supabase_vault" WITH SCHEMA "vault";
26+
27+
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA "extensions";
28+
29+
SET default_tablespace = '';
30+
31+
SET default_table_access_method = "heap";
32+
33+
CREATE TABLE IF NOT EXISTS "public"."blog_posts" (
34+
"id" bigint NOT NULL,
35+
"title" "text",
36+
"subtitle" "text",
37+
"status" "text",
38+
"markdown" "text",
39+
"markdown_ai_revision" "text",
40+
"created_at" timestamp with time zone DEFAULT "now"(),
41+
"ai_publishing_recommendations" "text"
42+
);
43+
44+
ALTER TABLE "public"."blog_posts" OWNER TO "postgres";
45+
46+
ALTER TABLE "public"."blog_posts" ALTER COLUMN "id" ADD GENERATED BY DEFAULT AS IDENTITY (
47+
SEQUENCE NAME "public"."blog_posts_id_seq"
48+
START WITH 1
49+
INCREMENT BY 1
50+
NO MINVALUE
51+
NO MAXVALUE
52+
CACHE 1
53+
);
54+
55+
CREATE TABLE IF NOT EXISTS "public"."workflows" (
56+
"id" bigint NOT NULL,
57+
"created_at" timestamp with time zone DEFAULT "now"() NOT NULL,
58+
"workflow" "jsonb",
59+
"enabled" boolean DEFAULT false,
60+
"trigger" "text",
61+
"description" "text",
62+
"name" "text"
63+
);
64+
65+
ALTER TABLE "public"."workflows" OWNER TO "postgres";
66+
67+
ALTER TABLE "public"."workflows" ALTER COLUMN "id" ADD GENERATED BY DEFAULT AS IDENTITY (
68+
SEQUENCE NAME "public"."workflows_id_seq"
69+
START WITH 1
70+
INCREMENT BY 1
71+
NO MINVALUE
72+
NO MAXVALUE
73+
CACHE 1
74+
);
75+
76+
ALTER TABLE ONLY "public"."blog_posts"
77+
ADD CONSTRAINT "blog_posts_pkey" PRIMARY KEY ("id");
78+
79+
ALTER TABLE ONLY "public"."workflows"
80+
ADD CONSTRAINT "workflows_pkey" PRIMARY KEY ("id");
81+
82+
ALTER PUBLICATION "supabase_realtime" OWNER TO "postgres";
83+
84+
GRANT USAGE ON SCHEMA "public" TO "postgres";
85+
GRANT USAGE ON SCHEMA "public" TO "anon";
86+
GRANT USAGE ON SCHEMA "public" TO "authenticated";
87+
GRANT USAGE ON SCHEMA "public" TO "service_role";
88+
89+
GRANT ALL ON TABLE "public"."blog_posts" TO "anon";
90+
GRANT ALL ON TABLE "public"."blog_posts" TO "authenticated";
91+
GRANT ALL ON TABLE "public"."blog_posts" TO "service_role";
92+
93+
GRANT ALL ON SEQUENCE "public"."blog_posts_id_seq" TO "anon";
94+
GRANT ALL ON SEQUENCE "public"."blog_posts_id_seq" TO "authenticated";
95+
GRANT ALL ON SEQUENCE "public"."blog_posts_id_seq" TO "service_role";
96+
97+
GRANT ALL ON TABLE "public"."workflows" TO "anon";
98+
GRANT ALL ON TABLE "public"."workflows" TO "authenticated";
99+
GRANT ALL ON TABLE "public"."workflows" TO "service_role";
100+
101+
GRANT ALL ON SEQUENCE "public"."workflows_id_seq" TO "anon";
102+
GRANT ALL ON SEQUENCE "public"."workflows_id_seq" TO "authenticated";
103+
GRANT ALL ON SEQUENCE "public"."workflows_id_seq" TO "service_role";
104+
105+
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "postgres";
106+
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "anon";
107+
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "authenticated";
108+
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "service_role";
109+
110+
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "postgres";
111+
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "anon";
112+
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "authenticated";
113+
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "service_role";
114+
115+
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "postgres";
116+
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "anon";
117+
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "authenticated";
118+
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "service_role";
119+
120+
RESET ALL;

0 commit comments

Comments
 (0)