Skip to content

Commit

Permalink
add migration for feedback table
Browse files Browse the repository at this point in the history
  • Loading branch information
ob6160 committed Sep 1, 2024
1 parent 3b17857 commit 6f3c7a5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions supabase/migrations/20240823182342_feedback_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- We use this to store feedback from our users
CREATE TABLE IF NOT EXISTS public.feedback (
id SERIAL PRIMARY KEY,
email VARCHAR(255) NOT NULL,
feedback_text TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Grant permissions on public.feedback
ALTER TABLE IF EXISTS public.feedback OWNER TO postgres;
GRANT ALL ON TABLE public.feedback TO authenticated;
GRANT ALL ON TABLE public.feedback TO service_role;
GRANT ALL ON TABLE public.feedback TO postgres;

-- Setup row-level security on public.feedback
ALTER TABLE public.feedback enable row level security;

0 comments on commit 6f3c7a5

Please sign in to comment.