Files
ok_r/supabase/migrations/20260128000003_add_user_login_fields.sql
karlcarlo 095f02700f feat: 添加数据库迁移脚本和 Supabase 工具配置
添加迁移脚本以支持数据库版本管理,配置 pnpm workspace 仅构建 supabase 依赖
新增用户登录字段和任务帮助请求功能,禁用 tasks 和 task_steps 表的 RLS
更新环境变量示例以支持自托管 Supabase 实例
2026-01-29 02:41:10 +08:00

16 lines
394 B
SQL

alter table public.users
add column if not exists username text null,
add column if not exists password_hash text null;
do $$
begin
if not exists (
select 1
from pg_indexes
where schemaname = 'public'
and indexname = 'users_username_unique'
) then
create unique index users_username_unique on public.users (username) where username is not null;
end if;
end $$;