fix(personal): harden pilot smoke and private storage
This commit is contained in:
@@ -1,10 +1,21 @@
|
||||
-- 个人 AI 助理独立知识空间。
|
||||
-- 个人知识仅按 tenant_id + owner_user_id 隔离,不修改或复用企业 aihr_knowledge_* 表。
|
||||
|
||||
-- 个人资料禁止使用公开桶;本地默认 MinIO 改为私有访问,下载统一走短时签名 URL。
|
||||
UPDATE `sys_oss_config`
|
||||
SET `access_policy` = '0', `update_time` = CURRENT_TIMESTAMP
|
||||
WHERE `tenant_id` = '000000' AND `config_key` = 'minio';
|
||||
-- 个人资料使用独立私有桶;不得修改企业知识使用的默认 MinIO 配置。
|
||||
INSERT INTO `sys_oss_config`
|
||||
(`oss_config_id`, `tenant_id`, `config_key`, `access_key`, `secret_key`, `bucket_name`, `prefix`,
|
||||
`endpoint`, `domain`, `is_https`, `region`, `access_policy`, `status`, `ext1`, `create_dept`,
|
||||
`create_by`, `create_time`, `update_by`, `update_time`, `remark`)
|
||||
SELECT 9001, source.`tenant_id`, 'personal-minio', source.`access_key`, source.`secret_key`,
|
||||
'ruoyi-personal', 'personal', source.`endpoint`, source.`domain`, source.`is_https`, source.`region`,
|
||||
'0', '1', '', source.`create_dept`, source.`create_by`, CURRENT_TIMESTAMP,
|
||||
source.`update_by`, CURRENT_TIMESTAMP, '个人AI助理专用私有对象存储'
|
||||
FROM `sys_oss_config` source
|
||||
WHERE source.`tenant_id` = '000000' AND source.`config_key` = 'minio'
|
||||
AND NOT EXISTS (
|
||||
SELECT 1 FROM `sys_oss_config` target
|
||||
WHERE target.`tenant_id` = source.`tenant_id` AND target.`config_key` = 'personal-minio'
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `aihr_personal_space` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
|
||||
Reference in New Issue
Block a user