Browse Source

[Fix-13977][SQL] 3.2.0_schema mysql ddl sql error (#13979)

3.2.0-release
Aaron Wang 2 years ago committed by GitHub
parent
commit
c2711f501f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_ddl.sql

4
dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_ddl.sql

@ -398,14 +398,14 @@ END IF;
AND TABLE_SCHEMA=(SELECT DATABASE())
AND COLUMN_NAME ='tenant_code')
THEN
ALTER TABLE t_ds_task_instance ADD `tenant_code` varchar(64) DEFAULT 'default' COMMENT 'tenant code';
ALTER TABLE t_ds_error_command ADD `tenant_code` varchar(64) DEFAULT 'default' COMMENT 'tenant code';
END IF;
IF NOT EXISTS (SELECT 1 FROM information_schema.COLUMNS
WHERE TABLE_NAME='t_ds_schedules'
AND TABLE_SCHEMA=(SELECT DATABASE())
AND COLUMN_NAME ='tenant_code')
THEN
ALTER TABLE t_ds_task_instance ADD `tenant_code` varchar(64) DEFAULT 'default' COMMENT 'tenant code';
ALTER TABLE t_ds_schedules ADD `tenant_code` varchar(64) DEFAULT 'default' COMMENT 'tenant code';
END IF;
END;
d//

Loading…
Cancel
Save