Skip to content

Commit b93bc85

Browse files
committed
feat(user-center): user_accounts 加 preferences 列
1 parent 8e90464 commit b93bc85

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/resources/schema.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ CREATE TABLE IF NOT EXISTS user_accounts (
1414
github_id BIGINT UNIQUE
1515
);
1616

17+
-- 偏好设置列(JSONB 顶层合并,前端可自由扩展 key)
18+
ALTER TABLE user_accounts ADD COLUMN IF NOT EXISTS preferences JSONB NOT NULL DEFAULT '{}'::jsonb;
19+
1720
-- 默认种子账号(已存在则跳过)
1821
-- admin / Admin@123456
1922
-- alice / Alice@123456

src/test/resources/test-schema.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ CREATE TABLE IF NOT EXISTS user_accounts (
99
permissions TEXT NOT NULL DEFAULT '',
1010
avatar_url VARCHAR(500),
1111
email VARCHAR(255),
12-
github_id BIGINT UNIQUE
12+
github_id BIGINT UNIQUE,
13+
preferences VARCHAR(4000) NOT NULL DEFAULT '{}'
1314
);
1415

1516
-- 种子账号(与生产保持一致)逐行插入,H2 兼容写法

0 commit comments

Comments
 (0)