Skip to content

Commit

Permalink
#48 beautify sql
Browse files Browse the repository at this point in the history
  • Loading branch information
gavin2lee committed Aug 17, 2021
1 parent 6757dd7 commit dcf40c1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
1 change: 1 addition & 0 deletions taskman-core/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.apt_generated/
/target/
/bin/
34 changes: 18 additions & 16 deletions taskman-core/src/main/resources/database/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ CREATE TABLE IF NOT EXISTS `attach_file` (
`s3_url` varchar(255) NOT NULL COMMENT 's3url',
`s3_bucket_name` varchar(50) DEFAULT NULL COMMENT 's3_bucket',
`s3_key_name` varchar(50) DEFAULT NULL COMMENT 's3_key',
`created_by` varchar(255) NOT NULL,
`created_by` varchar(255) NULL,
`created_time` datetime NULL,
`updated_by` varchar(255) NOT NULL,
`updated_by` varchar(255) NULL,
`updated_time` datetime NULL,
`del_flag` tinyint(2) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
Expand All @@ -23,8 +23,8 @@ CREATE TABLE IF NOT EXISTS `form_info` (
`name` varchar(255) NOT NULL,
`type` tinyint(2) NOT NULL DEFAULT '0',
`created_time` datetime NULL,
`created_by` varchar(255) NOT NULL,
`updated_by` varchar(255) NOT NULL,
`created_by` varchar(255) NULL,
`updated_by` varchar(255) NULL,
`updated_time` datetime NULL,
`del_flag` tinyint(2) NOT NULL DEFAULT '0',
`form_type` varchar(45) NULL,
Expand Down Expand Up @@ -91,9 +91,9 @@ CREATE TABLE IF NOT EXISTS `form_template` (
`output_attr_def` text ,
`other_attr_def` text ,
`style` varchar(50) DEFAULT NULL,
`created_by` varchar(255) NOT NULL,
`created_by` varchar(255) NULL,
`created_time` datetime NULL,
`updated_by` varchar(255) NOT NULL,
`updated_by` varchar(255) NULL,
`updated_time` datetime NULL,
`del_flag` tinyint(2) NOT NULL DEFAULT '0',
`form_type` varchar(45) NULL,
Expand All @@ -113,9 +113,9 @@ CREATE TABLE IF NOT EXISTS `request_info` (
`attach_file_id` varchar(32) DEFAULT NULL,
`status` varchar(50) NOT NULL DEFAULT '0',
`result` mediumtext ,
`created_by` varchar(255) NOT NULL,
`created_by` varchar(255) NULL,
`created_time` datetime NULL,
`updated_by` varchar(255) NOT NULL,
`updated_by` varchar(255) NULL,
`updated_time` datetime NULL,
`del_flag` tinyint(2) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
Expand All @@ -133,9 +133,11 @@ CREATE TABLE IF NOT EXISTS `request_template` (
`version` varchar(50) DEFAULT NULL,
`tags` varchar(512) DEFAULT NULL,
`status` tinyint(2) NOT NULL DEFAULT '0',
`created_by` varchar(255) NOT NULL,
`package_name` varchar(255) NULL,
`entity_name` varchar(255) NULL,
`created_by` varchar(255) NULL,
`created_time` datetime NULL,
`updated_by` varchar(255) NOT NULL,
`updated_by` varchar(255) NULL,
`updated_time` datetime NULL,
`del_flag` tinyint(2) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
Expand All @@ -150,9 +152,9 @@ CREATE TABLE IF NOT EXISTS `request_template_group` (
`description` varchar(512) DEFAULT NULL,
`version` varchar(50) NOT NULL DEFAULT '1',
`status` tinyint(2) NOT NULL DEFAULT '0',
`created_by` varchar(255) NOT NULL,
`created_by` varchar(255) NULL,
`created_time` datetime NULL,
`updated_by` varchar(255) NOT NULL,
`updated_by` varchar(255) NULL,
`updated_time` datetime NULL,
`del_flag` tinyint(2) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
Expand Down Expand Up @@ -191,9 +193,9 @@ CREATE TABLE IF NOT EXISTS `task_info` (
`attach_file_id` varchar(32) DEFAULT NULL,
`status` tinyint(2) DEFAULT '0',
`version` varchar(50) DEFAULT NULL,
`created_by` varchar(255) NOT NULL,
`created_by` varchar(255) NULL,
`created_time` datetime NULL,
`updated_by` varchar(255) NOT NULL,
`updated_by` varchar(255) NULL,
`updated_time` datetime NULL,
`del_flag` tinyint(2) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
Expand All @@ -209,9 +211,9 @@ CREATE TABLE IF NOT EXISTS `task_template` (
`node_name` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(512) DEFAULT NULL,
`created_by` varchar(255) NOT NULL,
`created_by` varchar(255) NULL,
`created_time` datetime NULL,
`updated_by` varchar(255) NOT NULL,
`updated_by` varchar(255) NULL,
`updated_time` datetime NULL,
`del_flag` tinyint(2) NOT NULL DEFAULT '0',
`request_template_id` varchar(32) NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
SELECT
rt.id,
rt.request_temp_group,
rtg.`name`
rtg.name
request_temp_group_name,
rt.proc_def_id,
rt.proc_def_key,
rt.proc_def_name,
rt.`name`,
rt.name,
rt.description,
rt.`name`,
rt.name,
rt.tags,
rt.`status`
rt.status
FROM request_template rt,request_template_group rtg
<where>
AND rt.request_temp_group = rtg.id
Expand Down

0 comments on commit dcf40c1

Please sign in to comment.