-- create teams table
create table teams (
id bigint generated by default as identity primary key,
creator uuid references users not null default auth.uid(),
title text default 'Untitled',
created_at timestamp with time zone default timezone('utc'::text, now()) not null
);
-- teams row level security
alter table teams enable row level security;
-- policies
create policy "Users can create teams" on teams for
insert to authenticated with check (true);
-- create teams table
create table teams (
id bigint generated by default as identity primary key,
creator uuid references users not null default auth.uid(),
title text default 'Untitled',
created_at timestamp with time zone default timezone('utc'::text, now()) not null
);
-- teams row level security
alter table teams enable row level security;
-- policies
create policy "Users can create teams" on teams for
insert to authenticated with check (true);