Initial commit from v0

This commit is contained in:
v0
2026-03-11 04:44:48 +00:00
commit 296c5dd78d
123 changed files with 21242 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
-- Fix spaces INSERT policy to allow any authenticated user to create a space
-- This is needed for the signup flow when a user creates their first space
-- Drop existing insert policy if it exists
drop policy if exists "spaces_insert_authenticated" on public.spaces;
-- Create a simple policy allowing any authenticated user to insert
create policy "spaces_insert_authenticated" on public.spaces
for insert
with check (auth.uid() is not null);
-- Also fix space_members INSERT policy to allow users to add themselves
drop policy if exists "space_members_insert_authenticated" on public.space_members;
create policy "space_members_insert_authenticated" on public.space_members
for insert
with check (
auth.uid() is not null
and user_id = auth.uid()
);