feat: 添加数据库迁移脚本和 Supabase 工具配置
添加迁移脚本以支持数据库版本管理,配置 pnpm workspace 仅构建 supabase 依赖 新增用户登录字段和任务帮助请求功能,禁用 tasks 和 task_steps 表的 RLS 更新环境变量示例以支持自托管 Supabase 实例
This commit is contained in:
15
supabase/migrations/20260128000003_add_user_login_fields.sql
Normal file
15
supabase/migrations/20260128000003_add_user_login_fields.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
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 $$;
|
||||
Reference in New Issue
Block a user