Skip to content

Instantly share code, notes, and snippets.

View chit-uob's full-sized avatar

Chit Lee chit-uob

View GitHub Profile
@chit-uob
chit-uob / supabase_svelte_todolist_todolist.sql
Created January 5, 2023 15:04
Set up todo list for Supabase Svelte Todo List example
--
-- For use with:
-- https://github.com/supabase/supabase/tree/master/examples/todo-list/nextjs-todo-list or
-- https://github.com/supabase/supabase/tree/master/examples/todo-list/react-todo-list or
-- https://github.com/supabase/supabase/tree/master/examples/todo-list/sveltejs-todo-list or
-- https://github.com/supabase/supabase/tree/master/examples/todo-list/vue3-ts-todo-list
--
create table todos (
id bigint generated by default as identity primary key,
@chit-uob
chit-uob / supabase_svelte_todolist_profiles.sql
Last active January 5, 2023 15:03
Set up profiles for Supabase Svelte Todo list example
-- Create a table for public profiles
create table profiles (
id uuid references auth.users not null primary key,
updated_at timestamp with time zone,
username text unique,
full_name text,
avatar_url text,
website text,
constraint username_length check (char_length(username) >= 3)