Browse Source

to issue/#8826 (#8827)

Co-authored-by: ouyangyewei <yewei.oyyw@alibaba-inc.com>
3.0.0/version-upgrade
ouyangyewei 3 years ago committed by GitHub
parent
commit
b0ffec5a4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql
  2. 2
      dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql
  3. 2
      dolphinscheduler-dao/src/main/resources/sql/upgrade/2.1.0_schema/mysql/dolphinscheduler_ddl.sql
  4. 3
      dolphinscheduler-dao/src/main/resources/sql/upgrade/2.1.0_schema/postgresql/dolphinscheduler_ddl.sql

3
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql

@ -285,7 +285,8 @@ CREATE TABLE `t_ds_alert` (
`alertgroup_id` int(11) DEFAULT NULL COMMENT 'alert group id', `alertgroup_id` int(11) DEFAULT NULL COMMENT 'alert group id',
`create_time` datetime DEFAULT NULL COMMENT 'create time', `create_time` datetime DEFAULT NULL COMMENT 'create time',
`update_time` datetime DEFAULT NULL COMMENT 'update time', `update_time` datetime DEFAULT NULL COMMENT 'update time',
PRIMARY KEY (`id`) PRIMARY KEY (`id`),
KEY `idx_status` (`alert_status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
-- ---------------------------- -- ----------------------------

2
dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql

@ -217,6 +217,8 @@ CREATE TABLE t_ds_alert (
PRIMARY KEY (id) PRIMARY KEY (id)
) ; ) ;
create index idx_status on t_ds_alert (alert_status);
-- --
-- Table structure for table t_ds_alertgroup -- Table structure for table t_ds_alertgroup
-- --

2
dolphinscheduler-dao/src/main/resources/sql/upgrade/2.1.0_schema/mysql/dolphinscheduler_ddl.sql

@ -31,6 +31,8 @@ alter table t_ds_task_definition add `task_group_priority` int(11) DEFAULT '0' C
ALTER TABLE `t_ds_user` ADD COLUMN `time_zone` varchar(32) DEFAULT NULL COMMENT 'time zone'; ALTER TABLE `t_ds_user` ADD COLUMN `time_zone` varchar(32) DEFAULT NULL COMMENT 'time zone';
ALTER TABLE `t_ds_alert` ADD INDEX `idx_status` (`alert_status`) USING BTREE;
-- --
-- Table structure for table `t_ds_dq_comparison_type` -- Table structure for table `t_ds_dq_comparison_type`
-- --

3
dolphinscheduler-dao/src/main/resources/sql/upgrade/2.1.0_schema/postgresql/dolphinscheduler_ddl.sql

@ -156,6 +156,9 @@ EXECUTE 'CREATE TABLE IF NOT EXISTS' || quote_ident(v_schema) ||'."t_ds_relation
CONSTRAINT t_ds_relation_rule_input_entry_pk PRIMARY KEY (id) CONSTRAINT t_ds_relation_rule_input_entry_pk PRIMARY KEY (id)
)'; )';
EXECUTE 'DROP INDEX IF EXISTS "idx_alert_status"';
EXECUTE 'CREATE INDEX IF NOT EXISTS idx_alert_status ON ' || quote_ident(v_schema) ||'.t_ds_alert USING Btree("alert_status")';
EXECUTE 'DROP INDEX IF EXISTS "idx_task_definition_log_project_code"'; EXECUTE 'DROP INDEX IF EXISTS "idx_task_definition_log_project_code"';
EXECUTE 'CREATE INDEX IF NOT EXISTS idx_task_definition_log_project_code ON ' || quote_ident(v_schema) ||'.t_ds_task_definition_log USING Btree("project_code")'; EXECUTE 'CREATE INDEX IF NOT EXISTS idx_task_definition_log_project_code ON ' || quote_ident(v_schema) ||'.t_ds_task_definition_log USING Btree("project_code")';

Loading…
Cancel
Save