fix: 桌面版flyway

This commit is contained in:
fit2cloud-chenyw 2023-12-06 21:00:35 +08:00
parent 64df2f08a4
commit 9c6ef1ca5c
2 changed files with 53 additions and 50 deletions

View File

@ -1,5 +1,6 @@
DROP TABLE IF EXISTS `visualization_template`;
CREATE TABLE `visualization_template` (
CREATE TABLE `visualization_template`
(
`id` varchar(50) NOT NULL COMMENT '主键',
`name` varchar(255) DEFAULT NULL COMMENT '名称',
`pid` varchar(255) DEFAULT NULL COMMENT '父级id',
@ -20,7 +21,8 @@ CREATE TABLE `visualization_template` (
-- Table structure for visualization_template_category
-- ----------------------------
DROP TABLE IF EXISTS `visualization_template_category`;
CREATE TABLE `visualization_template_category` (
CREATE TABLE `visualization_template_category`
(
`id` varchar(50) NOT NULL COMMENT '主键',
`name` varchar(255) DEFAULT NULL COMMENT '名称',
`pid` varchar(255) DEFAULT NULL COMMENT '父级id',
@ -38,7 +40,8 @@ CREATE TABLE `visualization_template_category` (
-- Table structure for visualization_template_category_map
-- ----------------------------
DROP TABLE IF EXISTS `visualization_template_category_map`;
CREATE TABLE `visualization_template_category_map` (
CREATE TABLE `visualization_template_category_map`
(
`id` varchar(50) NOT NULL COMMENT '主键',
`category_id` varchar(255) DEFAULT NULL COMMENT '名称',
`template_id` varchar(255) DEFAULT NULL COMMENT '父级id',
@ -49,29 +52,25 @@ CREATE TABLE `visualization_template_category_map` (
-- Table structure for visualization_template_extend_data
-- ----------------------------
DROP TABLE IF EXISTS `visualization_template_extend_data`;
CREATE TABLE `visualization_template_extend_data` (
CREATE TABLE `visualization_template_extend_data`
(
`id` bigint NOT NULL,
`dv_id` bigint DEFAULT NULL,
`view_id` bigint DEFAULT NULL,
`view_details` longtext ,
`view_details` longtext,
`copy_from` varchar(255) DEFAULT NULL,
`copy_id` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
);
BEGIN;
INSERT INTO `core_menu`
VALUES (19, 0, 2, 'template-market', 'template-market', 4, NULL, '/template-market', 1, 1, 0);
INSERT INTO `core_menu`
VALUES (30, 0, 1, 'toolbox', null, 7, 'icon_template', '/toolbox', 1, 1, 0);
INSERT INTO `core_menu`
VALUES (31, 30, 2, 'template-setting', 'toolbox/template-setting', 1, 'icon_template', '/template-setting', 0, 1, 1);
COMMIT;
ALTER TABLE `core_opt_recent`
MODIFY COLUMN `resource_id` bigint NULL COMMENT '资源ID' AFTER `id`,
ADD COLUMN `resource_name` varchar(255) NULL COMMENT '资源名称' AFTER `resource_id`;
ALTER TABLE core_opt_recent ADD `resource_name` varchar(255) NULL COMMENT '资源名称';
DROP TABLE IF EXISTS `core_area_custom`;
CREATE TABLE `core_area_custom`
@ -82,11 +81,11 @@ CREATE TABLE `core_area_custom`
PRIMARY KEY (`id`)
);
BEGIN;
INSERT INTO `core_sys_setting`
VALUES (1, 'basic.dsIntervalTime', '6', 'text', 2);
INSERT INTO `core_sys_setting`
VALUES (2, 'basic.dsExecuteTime', 'minute', 'text', 3);
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`) VALUES (7, 'template.url', 'https://templates.dataease.cn', 'text', 0);
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`) VALUES (8, 'template.accessKey', 'dataease', 'text', 1);
COMMIT;
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`)
VALUES (7, 'template.url', 'https://templates.dataease.cn', 'text', 0);
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`)
VALUES (8, 'template.accessKey', 'dataease', 'text', 1);

View File

@ -35,6 +35,10 @@ const cacheRequest = cb => {
}
export const configHandler = config => {
const desktop = wsCache.get('app.desktop')
if (desktop) {
return config
}
if (wsCache.get('user.token')) {
config.headers['X-DE-TOKEN'] = wsCache.get('user.token')
const expired = isExpired()