forked from alibaba/SmartEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
74 additions
and
73 deletions.
There are no files selected for viewing
147 changes: 74 additions & 73 deletions
147
extension/storage/storage-mysql/src/main/resources/sql/main-schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,108 @@ | ||
CREATE TABLE `se_deployment_instance` ( | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT , | ||
`gmt_create` datetime NOT NULL , | ||
`gmt_modified` datetime NOT NULL , | ||
`process_definition_id` varchar(255) NOT NULL , | ||
`process_definition_version` varchar(255) DEFAULT NULL , | ||
`process_definition_type` varchar(255) DEFAULT NULL , | ||
`process_definition_code` varchar(255) DEFAULT NULL , | ||
`process_definition_name` varchar(255) DEFAULT NULL , | ||
`process_definition_desc` varchar(255) DEFAULT NULL , | ||
`process_definition_content` mediumtext NOT NULL , | ||
`deployment_user_id` varchar(128) NOT NULL , | ||
`deployment_status` varchar(64) NOT NULL , | ||
`logic_status` varchar(64) NOT NULL , | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'PK' , | ||
`gmt_create` datetime NOT NULL COMMENT 'create time' , | ||
`gmt_modified` datetime NOT NULL COMMENT 'modification time' , | ||
`process_definition_id` varchar(255) NOT NULL COMMENT 'process definition id' , | ||
`process_definition_version` varchar(255) DEFAULT NULL COMMENT 'process definition version' , | ||
`process_definition_type` varchar(255) DEFAULT NULL COMMENT 'process definition type' , | ||
`process_definition_code` varchar(255) DEFAULT NULL COMMENT 'process definition code' , | ||
`process_definition_name` varchar(255) DEFAULT NULL COMMENT 'process definition name' , | ||
`process_definition_desc` varchar(255) DEFAULT NULL COMMENT 'process definition desc' , | ||
`process_definition_content` mediumtext NOT NULL COMMENT 'process definition content' , | ||
`deployment_user_id` varchar(128) NOT NULL COMMENT 'deployment user id' , | ||
`deployment_status` varchar(64) NOT NULL COMMENT 'deployment status' , | ||
`logic_status` varchar(64) NOT NULL COMMENT 'logic status' , | ||
|
||
PRIMARY KEY (`id`) | ||
) ; | ||
|
||
CREATE TABLE `se_process_instance` ( | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT , | ||
`gmt_create` datetime NOT NULL , | ||
`gmt_modified` datetime NOT NULL , | ||
`process_definition_id_and_version` varchar(128) NOT NULL , | ||
`process_definition_type` varchar(255) DEFAULT NULL , | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'PK' , | ||
`gmt_create` datetime NOT NULL COMMENT 'create time' , | ||
`gmt_modified` datetime NOT NULL COMMENT 'modification time' , | ||
`process_definition_id_and_version` varchar(128) NOT NULL COMMENT 'process definition id and version' , | ||
`process_definition_type` varchar(255) DEFAULT NULL COMMENT 'process definition type' , | ||
`status` varchar(64) NOT NULL COMMENT ' 1.running 2.completed 3.aborted', | ||
`parent_process_instance_id` bigint(20) unsigned DEFAULT NULL , | ||
`start_user_id` varchar(128) DEFAULT NULL , | ||
`biz_unique_id` varchar(255) DEFAULT NULL , | ||
`reason` varchar(255) DEFAULT NULL , | ||
`comment` varchar(255) DEFAULT NULL , | ||
`title` varchar(255) DEFAULT NULL , | ||
`tag` varchar(255) DEFAULT NULL , | ||
`parent_process_instance_id` bigint(20) unsigned DEFAULT NULL COMMENT 'parent process instance id' , | ||
`start_user_id` varchar(128) DEFAULT NULL COMMENT 'start user id' , | ||
`biz_unique_id` varchar(255) DEFAULT NULL COMMENT 'biz unique id' , | ||
`reason` varchar(255) DEFAULT NULL COMMENT 'reason' , | ||
`comment` varchar(255) DEFAULT NULL COMMENT 'comment' , | ||
`title` varchar(255) DEFAULT NULL COMMENT 'title' , | ||
`tag` varchar(255) DEFAULT NULL COMMENT 'tag' , | ||
|
||
PRIMARY KEY (`id`) | ||
) ; | ||
|
||
CREATE TABLE `se_activity_instance` ( | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT , | ||
`gmt_create` datetime NOT NULL , | ||
`gmt_modified` datetime NOT NULL , | ||
`process_instance_id` bigint(20) unsigned DEFAULT NULL , | ||
`process_definition_id_and_version` varchar(255) NOT NULL , | ||
`process_definition_activity_id` varchar(64) NOT NULL , | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'PK' , | ||
`gmt_create` datetime NOT NULL COMMENT 'create time' , | ||
`gmt_modified` datetime NOT NULL COMMENT 'modification time' , | ||
`process_instance_id` bigint(20) unsigned DEFAULT NULL COMMENT 'process instance id' , | ||
`process_definition_id_and_version` varchar(255) NOT NULL COMMENT 'process definition id and version' , | ||
`process_definition_activity_id` varchar(64) NOT NULL COMMENT 'process definition activity id' , | ||
PRIMARY KEY (`id`) | ||
) ; | ||
|
||
CREATE TABLE `se_task_instance` ( | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT , | ||
`gmt_create` datetime NOT NULL , | ||
`gmt_modified` datetime NOT NULL , | ||
`process_instance_id` bigint(20) unsigned NOT NULL , | ||
`process_definition_id_and_version` varchar(128) DEFAULT NULL , | ||
`process_definition_type` varchar(255) DEFAULT NULL , | ||
`activity_instance_id` bigint(20) unsigned NOT NULL , | ||
`process_definition_activity_id` varchar(255) NOT NULL , | ||
`execution_instance_id` bigint(20) unsigned NOT NULL , | ||
`claim_user_id` varchar(255) DEFAULT NULL , | ||
`title` varchar(255) DEFAULT NULL , | ||
`priority` int(11) DEFAULT 500, | ||
`tag` varchar(255) DEFAULT NULL , | ||
`claim_time` datetime DEFAULT NULL , | ||
`complete_time` datetime DEFAULT NULL , | ||
`status` varchar(255) NOT NULL , | ||
`comment` varchar(255) DEFAULT NULL , | ||
`extension` varchar(255) DEFAULT NULL , | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'PK' , | ||
`gmt_create` datetime NOT NULL COMMENT 'create time' , | ||
`gmt_modified` datetime NOT NULL COMMENT 'modification time' , | ||
`process_instance_id` bigint(20) unsigned NOT NULL COMMENT 'process instance id' , | ||
`process_definition_id_and_version` varchar(128) DEFAULT NULL COMMENT 'process definition id and version' , | ||
`process_definition_type` varchar(255) DEFAULT NULL COMMENT 'process definition type' , | ||
`activity_instance_id` bigint(20) unsigned NOT NULL COMMENT 'activity instance id' , | ||
`process_definition_activity_id` varchar(255) NOT NULL COMMENT 'process definition activity id' , | ||
`execution_instance_id` bigint(20) unsigned NOT NULL COMMENT 'execution instance id' , | ||
`claim_user_id` varchar(255) DEFAULT NULL COMMENT 'claim user id' , | ||
`title` varchar(255) DEFAULT NULL COMMENT 'title' , | ||
`priority` int(11) DEFAULT 500 COMMENT 'priority' , | ||
`tag` varchar(255) DEFAULT NULL COMMENT 'tag' , | ||
`claim_time` datetime DEFAULT NULL COMMENT 'claim time' , | ||
`complete_time` datetime DEFAULT NULL COMMENT 'complete time' , | ||
`status` varchar(255) NOT NULL COMMENT 'status' , | ||
`comment` varchar(255) DEFAULT NULL COMMENT 'comment' , | ||
`extension` varchar(255) DEFAULT NULL COMMENT 'extension' , | ||
|
||
PRIMARY KEY (`id`) | ||
) ; | ||
|
||
CREATE TABLE `se_execution_instance` ( | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT , | ||
`gmt_create` datetime NOT NULL , | ||
`gmt_modified` datetime NOT NULL , | ||
`process_instance_id` bigint(20) unsigned NOT NULL , | ||
`process_definition_id_and_version` varchar(255) NOT NULL , | ||
`process_definition_activity_id` varchar(255) NOT NULL , | ||
`activity_instance_id` bigint(20) unsigned NOT NULL , | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'PK' , | ||
`gmt_create` datetime NOT NULL COMMENT 'create time' , | ||
`gmt_modified` datetime NOT NULL COMMENT 'modification time' , | ||
`process_instance_id` bigint(20) unsigned NOT NULL COMMENT 'process instance id' , | ||
`process_definition_id_and_version` varchar(255) NOT NULL COMMENT 'process definition id and version' , | ||
`process_definition_activity_id` varchar(255) NOT NULL COMMENT 'process definition activity id' , | ||
`activity_instance_id` bigint(20) unsigned NOT NULL COMMENT 'activity instance id' , | ||
`active` tinyint(4) NOT NULL COMMENT '1:active 0:inactive', | ||
PRIMARY KEY (`id`) | ||
) ; | ||
|
||
|
||
CREATE TABLE `se_task_assignee_instance` ( | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT , | ||
`gmt_create` datetime NOT NULL , | ||
`gmt_modified` datetime NOT NULL , | ||
`process_instance_id` bigint(20) unsigned NOT NULL , | ||
`task_instance_id` bigint(20) unsigned NOT NULL , | ||
`assignee_id` varchar(255) NOT NULL , | ||
`assignee_type` varchar(128) NOT NULL , | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'PK' , | ||
`gmt_create` datetime NOT NULL COMMENT 'create time' , | ||
`gmt_modified` datetime NOT NULL COMMENT 'modification time' , | ||
`process_instance_id` bigint(20) unsigned NOT NULL COMMENT 'process instance id' , | ||
`task_instance_id` bigint(20) unsigned NOT NULL COMMENT 'task instance id' , | ||
`assignee_id` varchar(255) NOT NULL COMMENT 'assignee id' , | ||
`assignee_type` varchar(128) NOT NULL COMMENT 'assignee type' , | ||
PRIMARY KEY (`id`) | ||
) ; | ||
|
||
|
||
CREATE TABLE `se_variable_instance` ( | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT , | ||
`gmt_create` datetime NOT NULL , | ||
`gmt_modified` datetime NOT NULL , | ||
`process_instance_id` bigint(20) unsigned NOT NULL , | ||
`execution_instance_id` bigint(20) unsigned DEFAULT NULL , | ||
`field_key` varchar(128) NOT NULL , | ||
`field_type` varchar(128) NOT NULL , | ||
`field_double_value` decimal(65,30) DEFAULT NULL , | ||
`field_long_value` bigint(20) DEFAULT NULL , | ||
`field_string_value` varchar(4000) DEFAULT NULL , | ||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'PK' , | ||
`gmt_create` datetime NOT NULL COMMENT 'create time' , | ||
`gmt_modified` datetime NOT NULL COMMENT 'modification time' , | ||
`process_instance_id` bigint(20) unsigned NOT NULL COMMENT 'process instance id' , | ||
`execution_instance_id` bigint(20) unsigned DEFAULT NULL COMMENT 'execution instance id' , | ||
`field_key` varchar(128) NOT NULL COMMENT 'field key' , | ||
`field_type` varchar(128) NOT NULL COMMENT 'field type' , | ||
`field_double_value` decimal(65,30) DEFAULT NULL COMMENT 'field double value' , | ||
`field_long_value` bigint(20) DEFAULT NULL COMMENT 'field long value' , | ||
`field_string_value` varchar(4000) DEFAULT NULL COMMENT 'field string value' , | ||
|
||
PRIMARY KEY (`id`) | ||
) ; |