Fuxi/supabase/migrations/20231210071842_problems.sql

19 lines
684 B
MySQL
Raw Normal View History

2023-12-10 13:58:23 +00:00
create table
public.problems (
id bigint generated by default as identity,
title text not null,
description text not null,
type character varying not null,
tags character varying[] null,
author uuid null,
is_draft boolean null default true,
is_hidden boolean null default false,
created_at timestamp with time zone null default now(),
constraint problems_pkey primary key (id),
constraint problems_author_fkey foreign key (author) references auth.users (id)
) tablespace pg_default;
alter table public.problems enable row level security;
create policy "Public problems are viewable by everyone." on problems
for select using (true);