Files
kefu/im/backend/migrations/018_object_storage_providers.sql
T
2026-08-27 14:04:28 +08:00

40 lines
2.7 KiB
SQL

SET NAMES utf8mb4;
INSERT INTO system_configs (config_key, config_value, value_type, description) VALUES
('storage.provider', 'local', 'string', '文件存储提供商:local、aliyun_oss、tencent_cos、qiniu、huawei_obs 或 huawei_flexus'),
('storage.object_prefix', 'media', 'string', '云端对象键前缀'),
('storage.local.directory', './uploads', 'string', '本地文件存储目录'),
('storage.local.public_base_url', '', 'string', '本地文件公开访问地址'),
('storage.aliyun_oss.endpoint', 'https://oss-cn-hangzhou.aliyuncs.com', 'string', '阿里云 OSS Endpoint'),
('storage.aliyun_oss.region', 'cn-hangzhou', 'string', '阿里云 OSS Region'),
('storage.aliyun_oss.bucket', '', 'string', '阿里云 OSS Bucket'),
('storage.aliyun_oss.access_key_id', '', 'secret', '阿里云 OSS AccessKey ID'),
('storage.aliyun_oss.access_key_secret', '', 'secret', '阿里云 OSS AccessKey Secret'),
('storage.aliyun_oss.public_base_url', '', 'string', '阿里云 OSS 文件访问域名'),
('storage.tencent_cos.endpoint', '', 'string', '腾讯云 COS Bucket URL'),
('storage.tencent_cos.bucket', '', 'string', '腾讯云 COS Bucket'),
('storage.tencent_cos.secret_id', '', 'secret', '腾讯云 COS SecretId'),
('storage.tencent_cos.secret_key', '', 'secret', '腾讯云 COS SecretKey'),
('storage.tencent_cos.public_base_url', '', 'string', '腾讯云 COS 文件访问域名'),
('storage.qiniu.bucket', '', 'string', '七牛云 Kodo 空间名称'),
('storage.qiniu.access_key', '', 'secret', '七牛云 AccessKey'),
('storage.qiniu.secret_key', '', 'secret', '七牛云 SecretKey'),
('storage.qiniu.public_base_url', '', 'string', '七牛云文件访问域名'),
('storage.huawei_obs.endpoint', 'https://obs.cn-north-4.myhuaweicloud.com', 'string', '华为云 OBS Endpoint'),
('storage.huawei_obs.bucket', '', 'string', '华为云 OBS Bucket'),
('storage.huawei_obs.access_key', '', 'secret', '华为云 OBS Access Key'),
('storage.huawei_obs.secret_key', '', 'secret', '华为云 OBS Secret Key'),
('storage.huawei_obs.public_base_url', '', 'string', '华为云 OBS 文件访问域名'),
('storage.huawei_flexus.endpoint', '', 'string', '华为云 Flexus 对象存储 Endpoint'),
('storage.huawei_flexus.bucket', '', 'string', '华为云 Flexus 对象存储 Bucket'),
('storage.huawei_flexus.access_key', '', 'secret', '华为云 Flexus 对象存储 Access Key'),
('storage.huawei_flexus.secret_key', '', 'secret', '华为云 Flexus 对象存储 Secret Key'),
('storage.huawei_flexus.public_base_url', '', 'string', '华为云 Flexus 对象存储文件访问域名')
ON DUPLICATE KEY UPDATE description = VALUES(description), value_type = VALUES(value_type);