feat: 添加密码管理功能,包括 API、数据库支持和前端界面
This commit is contained in:
17
apps/server/migrations/0004_credentials.sql
Normal file
17
apps/server/migrations/0004_credentials.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
create table if not exists credentials (
|
||||
id uuid primary key default gen_random_uuid(),
|
||||
user_id uuid not null references users(id) on delete cascade,
|
||||
site_origin text not null,
|
||||
username text not null,
|
||||
password_enc text not null,
|
||||
password_iv text not null,
|
||||
password_tag text not null,
|
||||
created_at timestamptz not null default now(),
|
||||
updated_at timestamptz not null default now()
|
||||
);
|
||||
|
||||
create unique index if not exists idx_credentials_user_origin_username
|
||||
on credentials (user_id, site_origin, username);
|
||||
|
||||
create index if not exists idx_credentials_user_origin
|
||||
on credentials (user_id, site_origin);
|
||||
Reference in New Issue
Block a user