-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |