未验证 提交 f2044479 编写于 作者: J JinYong Li 提交者: GitHub

[Feature][Install] add upgrade 2.0 ddl (#6648)

* Optimizing SQL scripts

* add upgrade 2.0 ddl
上级 daca3baf
......@@ -83,9 +83,8 @@ public class DolphinSchedulerManager {
/**
* upgrade DolphinScheduler
* @throws Exception if error throws Exception
*/
public void upgradeDolphinScheduler() throws Exception{
public void upgradeDolphinScheduler() {
// Gets a list of all upgrades
List<String> schemaList = SchemaUtils.getAllSchemaList();
......@@ -119,10 +118,11 @@ public class DolphinSchedulerManager {
upgradeDao.upgradeDolphinSchedulerWorkerGroup();
} else if ("1.3.2".equals(schemaVersion)) {
upgradeDao.upgradeDolphinSchedulerResourceList();
} else if ("2.0.0".equals(schemaVersion)) {
upgradeDao.upgradeDolphinSchedulerJsonSplit();
}
version = schemaVersion;
}
}
}
......
......@@ -289,6 +289,13 @@ public abstract class UpgradeDao extends AbstractBaseDao {
updateProcessDefinitionJsonResourceList();
}
/**
* upgrade DolphinScheduler to 2.0.0
*/
public void upgradeDolphinSchedulerJsonSplit() {
processDefinitionJsonSplit();
}
/**
* updateProcessDefinitionJsonWorkerGroup
*/
......@@ -543,4 +550,7 @@ public abstract class UpgradeDao extends AbstractBaseDao {
}
public void processDefinitionJsonSplit() {
}
}
......@@ -760,7 +760,7 @@ CREATE TABLE `t_ds_schedules` (
`process_definition_code` bigint(20) NOT NULL COMMENT 'process definition code',
`start_time` datetime NOT NULL COMMENT 'start time',
`end_time` datetime NOT NULL COMMENT 'end time',
`timezone_id` varchar(40) DEFAULT NULL COMMENT 'timezoneId',
`timezone_id` varchar(40) DEFAULT NULL COMMENT 'schedule timezone id',
`crontab` varchar(255) NOT NULL COMMENT 'crontab description',
`failure_strategy` tinyint(4) NOT NULL COMMENT 'failure strategy. 0:end,1:continue',
`user_id` int(11) NOT NULL COMMENT 'user id',
......@@ -896,7 +896,7 @@ CREATE TABLE `t_ds_user` (
`create_time` datetime DEFAULT NULL COMMENT 'create time',
`update_time` datetime DEFAULT NULL COMMENT 'update time',
`queue` varchar(64) DEFAULT NULL COMMENT 'queue',
`state` int(1) DEFAULT 1 COMMENT 'state 0:disable 1:enable',
`state` tinyint(4) DEFAULT '1' COMMENT 'state 0:disable 1:enable',
PRIMARY KEY (`id`),
UNIQUE KEY `user_name_unique` (`user_name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
......
1.4.0
\ No newline at end of file
2.0.0
\ No newline at end of file
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
alter table t_ds_process_definition drop primary key;
ALTER TABLE t_ds_process_definition ADD PRIMARY KEY (`id`,`code`);
ALTER TABLE t_ds_process_definition drop KEY `process_definition_unique`;
ALTER TABLE t_ds_process_definition drop KEY `process_definition_index`;
alter table t_ds_process_definition drop project_id;
alter table t_ds_process_definition drop process_definition_json;
alter table t_ds_process_definition drop connects;
alter table t_ds_process_definition drop receivers;
alter table t_ds_process_definition drop receivers_cc;
alter table t_ds_process_definition drop modify_by;
alter table t_ds_process_definition drop resource_ids;
\ No newline at end of file
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册