chore: add missing feedback migration to match remote
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6f7613818b
commit
b53cb984eb
24
supabase/migrations/20240218000001_create_feedback_table.sql
Normal file
24
supabase/migrations/20240218000001_create_feedback_table.sql
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
-- Create feedback table
|
||||||
|
CREATE TABLE IF NOT EXISTS feedback (
|
||||||
|
id TEXT NOT NULL PRIMARY KEY,
|
||||||
|
user_id TEXT,
|
||||||
|
message TEXT NOT NULL,
|
||||||
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||||
|
);
|
||||||
|
|
||||||
|
-- Enable Row Level Security
|
||||||
|
ALTER TABLE feedback ENABLE ROW LEVEL SECURITY;
|
||||||
|
|
||||||
|
-- Allow anyone (authenticated or anonymous) to submit feedback
|
||||||
|
CREATE POLICY "Anyone can insert feedback"
|
||||||
|
ON feedback
|
||||||
|
FOR INSERT
|
||||||
|
TO anon, authenticated
|
||||||
|
WITH CHECK (true);
|
||||||
|
|
||||||
|
-- Allow service role full access (for admin review)
|
||||||
|
CREATE POLICY "Service role full access"
|
||||||
|
ON feedback
|
||||||
|
TO service_role
|
||||||
|
USING (true)
|
||||||
|
WITH CHECK (true);
|
||||||
Loading…
x
Reference in New Issue
Block a user