blob: 264c93e155002ebb35877b9c65c51242059d25b1 [file] [log] [blame]
/*
* 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.
*/
--
-- New linkis job
--
DROP TABLE IF EXISTS `linkis_ps_job_history_group_history`;
CREATE TABLE `linkis_ps_job_history_group_history` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key, auto increment',
`job_req_id` varchar(64) DEFAULT NULL COMMENT 'job execId',
`submit_user` varchar(50) DEFAULT NULL COMMENT 'who submitted this Job',
`execute_user` varchar(50) DEFAULT NULL COMMENT 'who actually executed this Job',
`source` text DEFAULT NULL COMMENT 'job source',
`labels` text DEFAULT NULL COMMENT 'job labels',
`params` text DEFAULT NULL COMMENT 'job labels',
`progress` float DEFAULT NULL COMMENT 'Job execution progress',
`status` varchar(50) DEFAULT NULL COMMENT 'Script execution status, must be one of the following: Inited, WaitForRetry, Scheduled, Running, Succeed, Failed, Cancelled, Timeout',
`log_path` varchar(200) DEFAULT NULL COMMENT 'File path of the job log',
`error_code` int DEFAULT NULL COMMENT 'Error code. Generated when the execution of the script fails',
`error_desc` varchar(1000) DEFAULT NULL COMMENT 'Execution description. Generated when the execution of script fails',
`created_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'Creation time',
`updated_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'Update time',
`instances` varchar(250) DEFAULT NULL COMMENT 'Entrance instances',
`engine_type` varchar(32) DEFAULT NULL COMMENT 'Engine type',
`execution_code` text DEFAULT NULL COMMENT 'Job origin code or code path',
PRIMARY KEY (`id`),
KEY `created_time` (`created_time`),
KEY `submit_user` (`submit_user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `linkis_ps_job_history_detail`;
CREATE TABLE `linkis_ps_job_history_detail` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key, auto increment',
`job_history_id` bigint(20) NOT NULL COMMENT 'ID of JobHistory',
`result_location` varchar(500) DEFAULT NULL COMMENT 'File path of the resultsets',
`execution_content` text DEFAULT NULL COMMENT 'The script code or other execution content executed by this Job',
`result_array_size` int(4) DEFAULT 0 COMMENT 'size of result array',
`job_group_info` text DEFAULT NULL COMMENT 'Job group info/path',
`created_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'Creation time',
`updated_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'Update time',
`status` varchar(32) DEFAULT NULL COMMENT 'status',
`priority` int(4) DEFAULT 0 COMMENT 'order of subjob',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;