Browse Source

Fix some SQL issues and make docker-compose runnable (#7329)

3.0.0/version-upgrade
kezhenxu94 3 years ago committed by GitHub
parent
commit
2ff76c7e73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      dolphinscheduler-dao/src/main/resources/sql/create/release-1.2.0_schema/postgresql/dolphinscheduler_ddl.sql
  2. 1
      dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.0_schema/mysql/dolphinscheduler_ddl.sql
  3. 2
      dolphinscheduler-tools/src/main/java/org/apache/dolphinscheduler/tools/datasource/dao/UpgradeDao.java
  4. 2
      dolphinscheduler-worker/src/main/docker/Dockerfile
  5. 8
      script/env/dolphinscheduler_env.sh

1
dolphinscheduler-dao/src/main/resources/sql/create/release-1.2.0_schema/postgresql/dolphinscheduler_ddl.sql

@ -375,6 +375,7 @@ DROP TABLE IF EXISTS t_ds_project;
CREATE TABLE t_ds_project ( CREATE TABLE t_ds_project (
id int NOT NULL , id int NOT NULL ,
name varchar(100) DEFAULT NULL , name varchar(100) DEFAULT NULL ,
code bigint NOT NULL,
description varchar(200) DEFAULT NULL , description varchar(200) DEFAULT NULL ,
user_id int DEFAULT NULL , user_id int DEFAULT NULL ,
flag int DEFAULT '1' , flag int DEFAULT '1' ,

1
dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.0_schema/mysql/dolphinscheduler_ddl.sql

@ -302,6 +302,7 @@ CREATE TABLE `t_ds_task_definition_log` (
`delay_time` int(11) DEFAULT '0' COMMENT 'delay execution time,unit: minute', `delay_time` int(11) DEFAULT '0' COMMENT 'delay execution time,unit: minute',
`resource_ids` text DEFAULT NULL COMMENT 'resource id, separated by comma', `resource_ids` text DEFAULT NULL COMMENT 'resource id, separated by comma',
`operator` int(11) DEFAULT NULL COMMENT 'operator user id', `operator` int(11) DEFAULT NULL COMMENT 'operator user id',
`task_group_id` int(11) DEFAULT NULL COMMENT 'task group id',
`operate_time` datetime DEFAULT NULL COMMENT 'operate time', `operate_time` datetime DEFAULT NULL COMMENT 'operate time',
`create_time` datetime NOT NULL COMMENT 'create time', `create_time` datetime NOT NULL COMMENT 'create time',
`update_time` datetime NOT NULL COMMENT 'update time', `update_time` datetime NOT NULL COMMENT 'update time',

2
dolphinscheduler-tools/src/main/java/org/apache/dolphinscheduler/tools/datasource/dao/UpgradeDao.java

@ -307,7 +307,7 @@ public abstract class UpgradeDao {
private void upgradeDolphinSchedulerDML(String schemaDir) { private void upgradeDolphinSchedulerDML(String schemaDir) {
String schemaVersion = schemaDir.split("_")[0]; String schemaVersion = schemaDir.split("_")[0];
Resource sqlFilePath = new ClassPathResource(String.format("sql/upgrade/%s/%s/dolphinscheduler_dml.sql", schemaDir, getDbType().name().toLowerCase())); Resource sqlFilePath = new ClassPathResource(String.format("sql/upgrade/%s/%s/dolphinscheduler_dml.sql", schemaDir, getDbType().name().toLowerCase()));
logger.info("sqlSQLFilePath" + sqlFilePath); logger.info("sqlSQLFilePath: {}", sqlFilePath);
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
try { try {

2
dolphinscheduler-worker/src/main/docker/Dockerfile

@ -22,7 +22,7 @@ ENV TZ Asia/Shanghai
ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler
RUN apt update ; \ RUN apt update ; \
apt install -y curl ; \ apt install -y curl sudo ; \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
WORKDIR $DOLPHINSCHEDULER_HOME WORKDIR $DOLPHINSCHEDULER_HOME

8
script/env/dolphinscheduler_env.sh vendored

@ -32,9 +32,9 @@ export SPRING_PROFILES_ACTIVE=${DATABASE}
export SPRING_DATASOURCE_URL export SPRING_DATASOURCE_URL
export SPRING_DATASOURCE_USERNAME export SPRING_DATASOURCE_USERNAME
export SPRING_DATASOURCE_PASSWORD export SPRING_DATASOURCE_PASSWORD
export SPRING_CACHE_TYPE=none export SPRING_CACHE_TYPE=${SPRING_CACHE_TYPE:-none}
export MASTER_FETCH_COMMAND_NUM=10 export MASTER_FETCH_COMMAND_NUM=${MASTER_FETCH_COMMAND_NUM:-10}
export REGISTRY_TYPE=zookeeper export REGISTRY_TYPE=${REGISTRY_TYPE:-zookeeper}
export REGISTRY_ZOOKEEPER_CONNECT_STRING=localhost:2181 export REGISTRY_ZOOKEEPER_CONNECT_STRING=${REGISTRY_ZOOKEEPER_CONNECT_STRING:-localhost:2181}

Loading…
Cancel
Save