增加“文件管理”模块后台数据库结构

This commit is contained in:
dataprince 2023-12-02 22:20:33 +08:00
parent 713b370d42
commit 36854b8ea8

View File

@ -657,3 +657,57 @@ values('产品树表删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'mf:
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('产品树表导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'mf:product:export', '#', 1, sysdate(), 1, null, '');
-- 表 sys_oss 结构
CREATE TABLE IF NOT EXISTS `sys_oss` (
`oss_id` bigint NOT NULL COMMENT '对象存储主键',
`file_name` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '文件名',
`original_name` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '原名',
`file_suffix` varchar(10) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '文件后缀名',
`url` varchar(500) COLLATE utf8mb4_bin NOT NULL COMMENT 'URL地址',
`service` varchar(20) COLLATE utf8mb4_bin NOT NULL DEFAULT 'minio' COMMENT '服务商',
`create_by` bigint DEFAULT NULL COMMENT '上传人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` bigint DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`oss_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='OSS对象存储表';
-- 表 sys_oss_config 结构
CREATE TABLE IF NOT EXISTS `sys_oss_config` (
`oss_config_id` bigint NOT NULL COMMENT '主建',
`config_key` varchar(20) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '配置key',
`access_key` varchar(255) COLLATE utf8mb4_bin DEFAULT '' COMMENT 'accessKey',
`secret_key` varchar(255) COLLATE utf8mb4_bin DEFAULT '' COMMENT '秘钥',
`bucket_name` varchar(255) COLLATE utf8mb4_bin DEFAULT '' COMMENT '桶名称',
`prefix` varchar(255) COLLATE utf8mb4_bin DEFAULT '' COMMENT '前缀',
`endpoint` varchar(255) COLLATE utf8mb4_bin DEFAULT '' COMMENT '访问站点',
`domain` varchar(255) COLLATE utf8mb4_bin DEFAULT '' COMMENT '自定义域名',
`is_https` char(1) COLLATE utf8mb4_bin DEFAULT 'N' COMMENT '是否httpsY=是,N=否)',
`region` varchar(255) COLLATE utf8mb4_bin DEFAULT '' COMMENT '',
`access_policy` char(1) COLLATE utf8mb4_bin NOT NULL DEFAULT '1' COMMENT '桶权限类型(0=private 1=public 2=custom)',
`status` char(1) COLLATE utf8mb4_bin DEFAULT '1' COMMENT '是否默认0=是,1=否)',
`ext1` varchar(255) COLLATE utf8mb4_bin DEFAULT '' COMMENT '扩展字段',
`create_by` bigint DEFAULT NULL COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` bigint DEFAULT NULL COMMENT '更新者',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`oss_config_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='对象存储配置表';
-- 表sys_oss_config 的数据:~4 rows (大约)
INSERT INTO `sys_oss_config` (`oss_config_id`, `config_key`, `access_key`, `secret_key`, `bucket_name`, `prefix`, `endpoint`, `domain`, `is_https`, `region`, `access_policy`, `status`, `ext1`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES
(1, 'minio', 'ruoyi-flex', 'ruoyi-flex@369', 'ruoyi-flex', '', '127.0.0.1:9000', '', 'N', '', '1', '0', '', 1, '2023-11-30 11:54:13', 1, '2023-12-01 14:23:59', NULL),
(2, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-flex', '', 's3-cn-north-1.qiniucs.com', '', 'N', '', '1', '1', '', 1, '2023-11-30 11:54:13', 1, '2023-12-01 14:25:43', NULL),
(3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-flex', '', 'oss-cn-beijing.aliyuncs.com', '', 'N', '', '1', '1', '', 1, '2023-11-30 11:54:13', 1, '2023-12-01 14:25:48', NULL),
(4, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-flex', '', 'cos.ap-beijing.myqcloud.com', '', 'N', '', '1', '1', '', 1, '2023-11-30 11:54:13', 1, '2023-12-01 14:26:02', NULL);
-- oss菜单
insert into sys_menu values('118', '文件管理', '1', '10', 'oss', 'system/oss/index', '', 1, 0, 'C', '0', '0', 'system:oss:list', 'upload', 1, sysdate(), 1, sysdate(), '文件管理菜单');
-- 修改avatar字段类型为bigint
UPDATE sys_user SET avatar=null WHERE user_id>=1;
ALTER TABLE `sys_user`
CHANGE COLUMN `avatar` `avatar` BIGINT NULL DEFAULT NULL COMMENT '头像地址' AFTER `gender`;