Add todos table migration

This commit is contained in:
EugeneTes
2026-08-15 11:23:40 +00:00
parent d69e65a979
commit afe9ba1956

View File

@@ -0,0 +1,10 @@
create table if not exists public.todos (
id bigserial primary key,
user_id uuid not null,
title text not null check (length(title) between 1 and 500),
completed boolean not null default false,
created_at timestamptz not null default now()
);
create index if not exists todos_user_id_created_at_idx
on public.todos (user_id, created_at desc);