From e5ea831b9de51021e55f0de8c7ba4be11df4e750 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Tue, 20 Jul 2021 16:05:43 +0800 Subject: [PATCH 1/2] * Change jenkins variables to general name. --- db/zentao.sql | 4 ++-- module/ci/control.php | 4 ++-- module/ci/model.php | 8 ++++---- module/compile/model.php | 10 +++++----- module/compile/view/browse.html.php | 2 +- module/job/config.php | 4 ++-- module/job/control.php | 8 ++++---- module/job/css/create.css | 4 ++-- module/job/css/edit.css | 4 ++-- module/job/js/create.js | 16 ++++++++-------- module/job/js/edit.js | 18 +++++++++--------- module/job/lang/de.php | 4 +++- module/job/lang/en.php | 5 ++++- module/job/lang/fr.php | 4 +++- module/job/lang/vi.php | 4 +++- module/job/lang/zh-cn.php | 5 ++++- module/job/lang/zh-tw.php | 4 +++- module/job/model.php | 6 +++--- module/job/view/browse.html.php | 4 ++-- module/job/view/create.html.php | 10 +++++----- module/job/view/edit.html.php | 12 ++++++------ module/job/view/view.html.php | 4 ++-- 22 files changed, 79 insertions(+), 65 deletions(-) diff --git a/db/zentao.sql b/db/zentao.sql index 0d5e499708..81d8801add 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -478,8 +478,8 @@ CREATE TABLE IF NOT EXISTS `zt_job` ( `repo` mediumint(8) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL, `frame` varchar(20) NOT NULL, - `jkHost` mediumint(8) unsigned NOT NULL, - `jkJob` varchar(500) NOT NULL, + `server` mediumint(8) unsigned NOT NULL, + `pipeline` varchar(500) NOT NULL, `triggerType` varchar(255) NOT NULL, `svnDir` varchar(255) NOT NULL, `atDay` varchar(255) DEFAULT NULL, diff --git a/module/ci/control.php b/module/ci/control.php index dd9a637b0c..1ead086056 100644 --- a/module/ci/control.php +++ b/module/ci/control.php @@ -102,9 +102,9 @@ class ci extends control $jobID = 0; if($compileID) { - $compile = $this->dao->select('t1.*, t2.jkJob,t2.product,t2.frame,t3.name as jenkinsName,t3.url,t3.account,t3.token,t3.password')->from(TABLE_COMPILE)->alias('t1') + $compile = $this->dao->select('t1.*, t2.pipeline,t2.product,t2.frame,t3.name as jenkinsName,t3.url,t3.account,t3.token,t3.password')->from(TABLE_COMPILE)->alias('t1') ->leftJoin(TABLE_JOB)->alias('t2')->on('t1.job=t2.id') - ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t2.jkHost=t3.id') + ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t2.server=t3.id') ->where('t1.id')->eq($compileID) ->fetch(); diff --git a/module/ci/model.php b/module/ci/model.php index 81c1fffece..45e9cee5ad 100644 --- a/module/ci/model.php +++ b/module/ci/model.php @@ -28,10 +28,10 @@ class ciModel extends model */ public function checkCompileStatus() { - $compiles = $this->dao->select('t1.*, t2.jkJob, t3.name as jenkinsName,t3.url,t3.account,t3.token,t3.password') + $compiles = $this->dao->select('t1.*, t2.pipeline, t3.name as jenkinsName,t3.url,t3.account,t3.token,t3.password') ->from(TABLE_COMPILE)->alias('t1') ->leftJoin(TABLE_JOB)->alias('t2')->on('t1.job=t2.id') - ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t2.jkHost=t3.id') + ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t2.server=t3.id') ->where('t1.status')->ne('success') ->andWhere('t1.status')->ne('failure') ->andWhere('t1.status')->ne('create_fail') @@ -68,7 +68,7 @@ class ciModel extends model $this->dao->update(TABLE_COMPILE)->set('times = times + 1')->where('id')->eq($compile->id)->exec(); if(strripos($response, "404") > -1) { - $infoUrl = sprintf("%s/job/%s/api/xml?tree=builds[id,number,result,queueId]&xpath=//build[queueId=%s]", $jenkinsServer, $compile->jkJob, $compile->queue); + $infoUrl = sprintf("%s/job/%s/api/xml?tree=builds[id,number,result,queueId]&xpath=//build[queueId=%s]", $jenkinsServer, $compile->pipeline, $compile->queue); $response = common::http($infoUrl, '', array(CURLOPT_USERPWD => $userPWD)); if($response) { @@ -80,7 +80,7 @@ class ciModel extends model if(empty($result)) return false; $this->updateBuildStatus($compile, $result); - $logUrl = sprintf('%s/job/%s/%s/consoleText', $jenkinsServer, $compile->jkJob, $buildNumber); + $logUrl = sprintf('%s/job/%s/%s/consoleText', $jenkinsServer, $compile->pipeline, $buildNumber); $response = common::http($logUrl, '', array(CURLOPT_USERPWD => $userPWD)); $this->dao->update(TABLE_COMPILE)->set('logs')->eq($response)->where('id')->eq($compile->id)->exec(); } diff --git a/module/compile/model.php b/module/compile/model.php index f9f1646335..b03b2b7036 100644 --- a/module/compile/model.php +++ b/module/compile/model.php @@ -34,10 +34,10 @@ class compileModel extends model */ public function getList($jobID, $orderBy = 'id_desc', $pager = null) { - return $this->dao->select('t1.id, t1.name, t1.job, t1.status, t1.createdDate,t1.testtask, t2.jkJob,t2.triggerType,t2.comment,t2.atDay,t2.atTime, t3.name as repoName, t4.name as jenkinsName')->from(TABLE_COMPILE)->alias('t1') + return $this->dao->select('t1.id, t1.name, t1.job, t1.status, t1.createdDate,t1.testtask, t2.pipeline,t2.triggerType,t2.comment,t2.atDay,t2.atTime, t3.name as repoName, t4.name as jenkinsName')->from(TABLE_COMPILE)->alias('t1') ->leftJoin(TABLE_JOB)->alias('t2')->on('t1.job=t2.id') ->leftJoin(TABLE_REPO)->alias('t3')->on('t2.repo=t3.id') - ->leftJoin(TABLE_PIPELINE)->alias('t4')->on('t2.jkHost=t4.id') + ->leftJoin(TABLE_PIPELINE)->alias('t4')->on('t2.server=t4.id') ->where('t1.deleted')->eq('0') ->andWhere('t1.job')->ne('0') ->beginIF(!empty($jobID))->andWhere('t1.job')->eq($jobID)->fi() @@ -84,7 +84,7 @@ class compileModel extends model $url = new stdclass(); $url->userPWD = "$jenkinsUser:$jenkinsPassword"; - $url->url = sprintf('%s/job/%s/buildWithParameters/api/json', $jenkinsServer, $jenkins->jkJob); + $url->url = sprintf('%s/job/%s/buildWithParameters/api/json', $jenkinsServer, $jenkins->pipeline); return $url; } @@ -121,9 +121,9 @@ class compileModel extends model */ public function exec($compile) { - $job = $this->dao->select('t1.id,t1.name,t1.repo,t1.jkJob,t2.name as jenkinsName,t2.url,t2.account,t2.token,t2.password') + $job = $this->dao->select('t1.id,t1.name,t1.repo,t1.pipeline,t2.name as jenkinsName,t2.url,t2.account,t2.token,t2.password') ->from(TABLE_JOB)->alias('t1') - ->leftJoin(TABLE_PIPELINE)->alias('t2')->on('t1.jkHost=t2.id') + ->leftJoin(TABLE_PIPELINE)->alias('t2')->on('t1.server=t2.id') ->where('t1.id')->eq($compile->job) ->fetch(); diff --git a/module/compile/view/browse.html.php b/module/compile/view/browse.html.php index 899ad70a6c..0f8820e775 100644 --- a/module/compile/view/browse.html.php +++ b/module/compile/view/browse.html.php @@ -42,7 +42,7 @@ createLink('job', 'view', "jobID={$build->job}&compileID={$build->id}", 'html', true), $build->name, '', "class='iframe' data-width='90%'") : $build->name;?> repoName;?> - jkJob) . '@' . $build->jenkinsName;?> + pipeline) . '@' . $build->jenkinsName;?> loadModel('job')->getTriggerConfig($build);?> diff --git a/module/job/config.php b/module/job/config.php index fbca68a83a..75baa8009d 100644 --- a/module/job/config.php +++ b/module/job/config.php @@ -2,5 +2,5 @@ $config->job = new stdclass(); $config->job->create = new stdclass(); $config->job->edit = new stdclass(); -$config->job->create->requiredFields = 'name,repo,jkHost,jkJob,triggerType'; -$config->job->edit->requiredFields = 'name,repo,jkHost,jkJob,triggerType'; +$config->job->create->requiredFields = 'name,repo,server,pipeline,triggerType'; +$config->job->edit->requiredFields = 'name,repo,server,pipeline,triggerType'; diff --git a/module/job/control.php b/module/job/control.php index 5151d7eb4e..5baf3183da 100644 --- a/module/job/control.php +++ b/module/job/control.php @@ -86,7 +86,7 @@ class job extends control $this->view->repoPairs = $repoPairs; $this->view->repoTypes = $repoTypes; $this->view->products = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->projectID); - $this->view->jkHostList = $this->loadModel('jenkins')->getPairs(); + $this->view->serverList = $this->loadModel('jenkins')->getPairs(); $this->display(); } @@ -129,8 +129,8 @@ class job extends control $this->view->repoType = zget($repoTypes, $job->repo, 'Git'); $this->view->job = $job; $this->view->products = array(0 => '') + $this->loadModel('product')->getProductPairsByProject($this->projectID); - $this->view->jkHostList = $this->loadModel('jenkins')->getPairs(); - $this->view->jkJobs = $this->jenkins->getTasks($job->jkHost); + $this->view->serverList = $this->loadModel('jenkins')->getPairs(); + $this->view->pipelines = $this->jenkins->getTasks($job->server); $this->display(); } @@ -226,7 +226,7 @@ class job extends control $this->view->job = $job; $this->view->compile = $compile; $this->view->repo = $this->loadModel('repo')->getRepoByID($job->repo); - $this->view->jenkins = $this->loadModel('jenkins')->getById($job->jkHost); + $this->view->jenkins = $this->loadModel('jenkins')->getById($job->server); $this->view->product = $this->loadModel('product')->getById($job->product); $this->display(); } diff --git a/module/job/css/create.css b/module/job/css/create.css index cbbff7de9e..2eaabdfeb4 100644 --- a/module/job/css/create.css +++ b/module/job/css/create.css @@ -2,7 +2,7 @@ .only-pick-time thead th, .only-pick-time tfoot th {color: transparent !important;} .checkbox-primary.checkbox-inline {display: inline-block !important;} .checkbox-primary.checkbox-inline label {padding-left: 5px !important;} -#jkHost_chosen .chosen-single {border-right: 0px;} -#jkJobBox {width: 385px;} +#server_chosen .chosen-single {border-right: 0px;} +#pipelineBox {width: 385px;} #svnDirBox .input-group {width: unset !important;} #paramDiv .input-group {padding: 3px;} diff --git a/module/job/css/edit.css b/module/job/css/edit.css index cbbff7de9e..2eaabdfeb4 100644 --- a/module/job/css/edit.css +++ b/module/job/css/edit.css @@ -2,7 +2,7 @@ .only-pick-time thead th, .only-pick-time tfoot th {color: transparent !important;} .checkbox-primary.checkbox-inline {display: inline-block !important;} .checkbox-primary.checkbox-inline label {padding-left: 5px !important;} -#jkHost_chosen .chosen-single {border-right: 0px;} -#jkJobBox {width: 385px;} +#server_chosen .chosen-single {border-right: 0px;} +#pipelineBox {width: 385px;} #svnDirBox .input-group {width: unset !important;} #paramDiv .input-group {padding: 3px;} diff --git a/module/job/js/create.js b/module/job/js/create.js index 20d93c09ed..517b7eab3a 100644 --- a/module/job/js/create.js +++ b/module/job/js/create.js @@ -82,25 +82,25 @@ $('#triggerType').change(function() } }); -$('#jkHost').change(function() +$('#server').change(function() { var jenkinsID = $(this).val(); - $('#jkJobBox #jkJob').remove(); - $('#jkJobBox #jkJob_chosen').remove(); - $('#jkJobBox .input-group').append("
"); + $('#pipelineBox #pipeline').remove(); + $('#pipelineBox #pipeline_chosen').remove(); + $('#pipelineBox .input-group').append("
"); $.getJSON(createLink('jenkins', 'ajaxGetTasks', 'jenkinsID=' + jenkinsID), function(tasks) { - html = ""; for(taskKey in tasks) { var task = tasks[taskKey]; html += ""; } html += ''; - $('#jkJobBox .loading').remove(); - $('#jkJobBox .input-group').append(html); + $('#pipelineBox .loading').remove(); + $('#pipelineBox .input-group').append(html); - $('#jkJobBox #jkJob').chosen({drop_direction: 'auto'}); + $('#pipelineBox #pipeline').chosen({drop_direction: 'auto'}); }) }) diff --git a/module/job/js/edit.js b/module/job/js/edit.js index 4b30331753..7493ff25b3 100644 --- a/module/job/js/edit.js +++ b/module/job/js/edit.js @@ -86,30 +86,30 @@ $('#triggerType').change(function() } }); -$('#jkHost').change(function() +$('#server').change(function() { var jenkinsID = $(this).val(); - $('#jkJobBox #jkJob').remove(); - $('#jkJobBox #jkJob_chosen').remove(); - $('#jkJobBox .input-group').append("
"); + $('#pipelineBox #pipeline').remove(); + $('#pipelineBox #pipeline_chosen').remove(); + $('#pipelineBox .input-group').append("
"); $.getJSON(createLink('jenkins', 'ajaxGetTasks', 'jenkinsID=' + jenkinsID), function(tasks) { - html = ""; for(taskKey in tasks) { var task = tasks[taskKey]; html += ""; } html += ''; - $('#jkJobBox .loading').remove(); - $('#jkJobBox .input-group').append(html); + $('#pipelineBox .loading').remove(); + $('#pipelineBox .input-group').append(html); - $('#jkJobBox #jkJob').val(jkJob).chosen({drop_direction: 'auto'}); + $('#pipelineBox #pipeline').val(pipeline).chosen({drop_direction: 'auto'}); }) }) $(function() { - $('#jkHost').change(); + $('#server').change(); $('#triggerType').change(); }); diff --git a/module/job/lang/de.php b/module/job/lang/de.php index a25a455a43..d9dc102465 100644 --- a/module/job/lang/de.php +++ b/module/job/lang/de.php @@ -17,8 +17,10 @@ $lang->job->product = $lang->productCommon; $lang->job->svnDir = 'SVN Tag Watch Path'; $lang->job->jenkins = 'Jenkins'; $lang->job->jkHost = 'Jenkins Server'; -$lang->job->buildType = 'Build Type'; $lang->job->jkJob = 'Jenkins Task'; +$lang->job->server = 'Server'; +$lang->job->pipeline = 'Pipeline'; +$lang->job->buildType = 'Build Type'; $lang->job->frame = 'Frame'; $lang->job->triggerType = 'Trigger'; $lang->job->atDay = 'Custom Days'; diff --git a/module/job/lang/en.php b/module/job/lang/en.php index b7d5877f00..3cf9727194 100644 --- a/module/job/lang/en.php +++ b/module/job/lang/en.php @@ -19,8 +19,11 @@ $lang->job->product = $lang->productCommon; $lang->job->svnDir = 'SVN Tag Watch Path'; $lang->job->jenkins = 'Jenkins'; $lang->job->jkHost = 'Jenkins Server'; -$lang->job->buildType = 'Build Type'; $lang->job->jkJob = 'Jenkins Task'; +$lang->job->engine = 'Engine'; +$lang->job->server = 'Server'; +$lang->job->pipeline = 'Pipeline'; +$lang->job->buildType = 'Build Type'; $lang->job->frame = 'Frame'; $lang->job->triggerType = 'Trigger'; $lang->job->atDay = 'Custom Days'; diff --git a/module/job/lang/fr.php b/module/job/lang/fr.php index 87a500e728..4494a9ed78 100644 --- a/module/job/lang/fr.php +++ b/module/job/lang/fr.php @@ -17,8 +17,10 @@ $lang->job->product = $lang->productCommon; $lang->job->svnDir = 'SVN Tag Watch Path'; $lang->job->jenkins = 'Jenkins'; $lang->job->jkHost = 'Serveur Jenkins'; -$lang->job->buildType = 'Type Build'; $lang->job->jkJob = 'T鈉he Jenkins'; +$lang->job->server = 'Serveur'; +$lang->job->pipeline = 'Pipeline'; +$lang->job->buildType = 'Type Build'; $lang->job->frame = 'Cadre'; $lang->job->triggerType = 'D閏lencheur'; $lang->job->atDay = 'Jours Person.'; diff --git a/module/job/lang/vi.php b/module/job/lang/vi.php index 490c38ef61..d6a5c8a22d 100644 --- a/module/job/lang/vi.php +++ b/module/job/lang/vi.php @@ -17,8 +17,10 @@ $lang->job->product = $lang->productCommon; $lang->job->svnDir = 'SVN Tag Watch Path'; $lang->job->jenkins = 'Jenkins'; $lang->job->jkHost = 'Jenkins Server'; -$lang->job->buildType = 'Loại bản dựng'; $lang->job->jkJob = 'Jenkins nhiệm vụ'; +$lang->job->server = 'Server'; +$lang->job->pipeline = 'Pipeline'; +$lang->job->buildType = 'Loại bản dựng'; $lang->job->frame = 'Frame'; $lang->job->triggerType = 'Trigger'; $lang->job->atDay = 'Ngày tùy chọn'; diff --git a/module/job/lang/zh-cn.php b/module/job/lang/zh-cn.php index 366fb3c0de..4fa94783f1 100644 --- a/module/job/lang/zh-cn.php +++ b/module/job/lang/zh-cn.php @@ -19,8 +19,11 @@ $lang->job->product = '关联' . $lang->productCommon; $lang->job->svnDir = 'SVN监控路径'; $lang->job->jenkins = 'Jenkins'; $lang->job->jkHost = 'Jenkins服务器'; -$lang->job->buildType = '构建类型'; $lang->job->jkJob = 'Jenkins任务'; +$lang->job->engine = '构建引擎'; +$lang->job->server = '服务器'; +$lang->job->pipeline = '流水线'; +$lang->job->buildType = '构建类型'; $lang->job->frame = '工具/框架'; $lang->job->triggerType = '触发方式'; $lang->job->atDay = '自定义日期'; diff --git a/module/job/lang/zh-tw.php b/module/job/lang/zh-tw.php index 00f69b430f..9449dc686e 100644 --- a/module/job/lang/zh-tw.php +++ b/module/job/lang/zh-tw.php @@ -19,8 +19,10 @@ $lang->job->product = '關聯' . $lang->productCommon; $lang->job->svnDir = 'SVN監控路徑'; $lang->job->jenkins = 'Jenkins'; $lang->job->jkHost = 'Jenkins伺服器'; -$lang->job->buildType = '構建類型'; $lang->job->jkJob = 'Jenkins任務'; +$lang->job->server = '伺服器'; +$lang->job->pipeline = '流水線'; +$lang->job->buildType = '構建類型'; $lang->job->frame = '工具/框架'; $lang->job->triggerType = '觸發方式'; $lang->job->atDay = '自定義日期'; diff --git a/module/job/model.php b/module/job/model.php index c948ada4e7..5ac819f9a0 100644 --- a/module/job/model.php +++ b/module/job/model.php @@ -35,7 +35,7 @@ class jobModel extends model { return $this->dao->select('t1.*, t2.name as repoName, t3.name as jenkinsName')->from(TABLE_JOB)->alias('t1') ->leftJoin(TABLE_REPO)->alias('t2')->on('t1.repo=t2.id') - ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t1.jkHost=t3.id') + ->leftJoin(TABLE_PIPELINE)->alias('t3')->on('t1.server=t3.id') ->where('t1.deleted')->eq('0') ->orderBy($orderBy) ->page($pager) @@ -288,9 +288,9 @@ class jobModel extends model */ public function exec($id) { - $job = $this->dao->select('t1.id,t1.name,t1.product,t1.repo,t1.jkJob,t1.triggerType,t1.atTime,t1.customParam,t2.name as jenkinsName,t2.url,t2.account,t2.token,t2.password') + $job = $this->dao->select('t1.id,t1.name,t1.product,t1.repo,t1.pipeline,t1.triggerType,t1.atTime,t1.customParam,t2.name as jenkinsName,t2.url,t2.account,t2.token,t2.password') ->from(TABLE_JOB)->alias('t1') - ->leftJoin(TABLE_PIPELINE)->alias('t2')->on('t1.jkHost=t2.id') + ->leftJoin(TABLE_PIPELINE)->alias('t2')->on('t1.server=t2.id') ->where('t1.id')->eq($id) ->fetch(); if(!$job) return false; diff --git a/module/job/view/browse.html.php b/module/job/view/browse.html.php index c54b21a591..4e580471c0 100644 --- a/module/job/view/browse.html.php +++ b/module/job/view/browse.html.php @@ -30,7 +30,7 @@ job->name);?> job->repo);?> job->frame);?> - job->jenkins);?> + job->jenkins);?> job->triggerType;?> job->lastStatus);?> job->lastExec);?> @@ -44,7 +44,7 @@ createLink('job', 'view', "jobID={$job->id}", 'html', true), $job->name, '', "class='iframe' data-width='90%'") : $job->name;?> repoName; ?> job->frameList, $job->frame);?> - jkJob) . '@' . $job->jenkinsName;?> + pipeline) . '@' . $job->jenkinsName;?> job->getTriggerConfig($job);?> diff --git a/module/job/view/create.html.php b/module/job/view/create.html.php index 955e283804..83d2d51bac 100644 --- a/module/job/view/create.html.php +++ b/module/job/view/create.html.php @@ -73,14 +73,14 @@ - job->jkHost; ?> + job->server; ?>
-
-
+
+
- job->jkJob; ?> - ''), '', "class='form-control chosen'"); ?> + job->pipeline; ?> + ''), '', "class='form-control chosen'"); ?>
diff --git a/module/job/view/edit.html.php b/module/job/view/edit.html.php index 91f0fb6057..222b5260c5 100644 --- a/module/job/view/edit.html.php +++ b/module/job/view/edit.html.php @@ -14,7 +14,7 @@ triggerType);?> -jkJob);?> +pipeline);?> job->dirChange);?> job->buildTag);?> @@ -96,14 +96,14 @@ - job->jkHost; ?> + job->server; ?>
-
jkHost, "class='form-control chosen'");?>
-
+
server, "class='form-control chosen'");?>
+
- job->jkJob; ?> - ''), $job->jkJob, "class='form-control chosen'");?> + job->pipeline; ?> + ''), $job->pipeline, "class='form-control chosen'");?>
diff --git a/module/job/view/view.html.php b/module/job/view/view.html.php index e546cb27ed..ee280691db 100644 --- a/module/job/view/view.html.php +++ b/module/job/view/view.html.php @@ -50,8 +50,8 @@ job->frameList, $job->frame);?> - job->jkHost;?> - jkJob) . '@' . $jenkins->name;?> + job->server;?> + pipeline) . '@' . $jenkins->name;?> job->triggerType;?> From 661dcdcc13a9db78f7ab1ed7830f0772b796f43d Mon Sep 17 00:00:00 2001 From: dingguodong Date: Tue, 20 Jul 2021 16:13:48 +0800 Subject: [PATCH 2/2] + Add engine column to zt_job. --- db/zentao.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/zentao.sql b/db/zentao.sql index 81d8801add..9457583bc7 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -478,6 +478,7 @@ CREATE TABLE IF NOT EXISTS `zt_job` ( `repo` mediumint(8) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL, `frame` varchar(20) NOT NULL, + `engine` varchar(20) NOT NULL, `server` mediumint(8) unsigned NOT NULL, `pipeline` varchar(500) NOT NULL, `triggerType` varchar(255) NOT NULL,