Commit 1ae9602c authored by Quxl's avatar Quxl

增加初始化SQL

parent d2a288e5
/*
Navicat Premium Data Transfer
Target Server Type : MySQL
Target Server Version : 50641
File Encoding : 65001
Date: 13/09/2018 09:37:42
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_flow
-- ----------------------------
DROP TABLE IF EXISTS `t_flow`;
CREATE TABLE `t_flow` (
`sFlowID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`sFlowName` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sVectorData` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
`sFlowSettings` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
`nDelFlag` int(1) NULL DEFAULT NULL,
`sRemark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`dCreate` datetime(0) NULL DEFAULT NULL,
PRIMARY KEY (`sFlowID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_flow_log
-- ----------------------------
DROP TABLE IF EXISTS `t_flow_log`;
CREATE TABLE `t_flow_log` (
`sTaskID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`sFlowID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sWorkID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sUserID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sOwnerID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sAcceptorID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sNodeID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sNodeType` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sFlowName` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sTransferName` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sTransferTo` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sRemark` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
`dCommit` datetime(0) NULL DEFAULT NULL,
`dAccept` datetime(0) NULL DEFAULT NULL,
`sVars` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
PRIMARY KEY (`sTaskID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_flow_task
-- ----------------------------
DROP TABLE IF EXISTS `t_flow_task`;
CREATE TABLE `t_flow_task` (
`sTaskID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`sFlowID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sWorkID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sNodeID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sNodeType` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sOwnerID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sAcceptorID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`dCreate` datetime(0) NULL DEFAULT NULL,
`dAccept` datetime(0) NULL DEFAULT NULL,
`sVars` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
PRIMARY KEY (`sTaskID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_flow_user
-- ----------------------------
DROP TABLE IF EXISTS `t_flow_user`;
CREATE TABLE `t_flow_user` (
`sTaskID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`sUserID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`sTaskID`, `sUserID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;
/*
Navicat Premium Data Transfer
Target Server Type : SQL Server
Target Server Version : 12002000
File Encoding : 65001
Date: 13/09/2018 09:34:45
*/
-- ----------------------------
-- Table structure for t_flow
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_flow]') AND type IN ('U'))
DROP TABLE [dbo].[t_flow]
GO
CREATE TABLE [dbo].[t_flow] (
[sFlowID] varchar(64) COLLATE Chinese_PRC_CS_AI NOT NULL,
[sFlowName] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sVectorData] text COLLATE Chinese_PRC_CS_AI NULL,
[sFlowSettings] text COLLATE Chinese_PRC_CS_AI NULL,
[nDelFlag] int DEFAULT NULL NULL,
[sRemark] varchar(255) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[dCreate] datetime DEFAULT NULL NULL
)
GO
ALTER TABLE [dbo].[t_flow] SET (LOCK_ESCALATION = TABLE)
GO
-- ----------------------------
-- Table structure for t_flow_log
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_flow_log]') AND type IN ('U'))
DROP TABLE [dbo].[t_flow_log]
GO
CREATE TABLE [dbo].[t_flow_log] (
[sTaskID] varchar(64) COLLATE Chinese_PRC_CS_AI NOT NULL,
[sFlowID] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sWorkID] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sUserID] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sOwnerID] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sAcceptorID] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sNodeID] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sNodeType] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sFlowName] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sTransferName] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sTransferTo] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sRemark] text COLLATE Chinese_PRC_CS_AI NULL,
[dCommit] datetime DEFAULT NULL NULL,
[dAccept] datetime DEFAULT NULL NULL,
[sVars] text COLLATE Chinese_PRC_CS_AI NULL
)
GO
ALTER TABLE [dbo].[t_flow_log] SET (LOCK_ESCALATION = TABLE)
GO
-- ----------------------------
-- Table structure for t_flow_task
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_flow_task]') AND type IN ('U'))
DROP TABLE [dbo].[t_flow_task]
GO
CREATE TABLE [dbo].[t_flow_task] (
[sTaskID] varchar(64) COLLATE Chinese_PRC_CS_AI NOT NULL,
[sFlowID] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sWorkID] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sNodeID] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sNodeType] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sOwnerID] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[sAcceptorID] varchar(64) COLLATE Chinese_PRC_CS_AI DEFAULT NULL NULL,
[dCreate] datetime DEFAULT NULL NULL,
[dAccept] datetime DEFAULT NULL NULL,
[sVars] text COLLATE Chinese_PRC_CS_AI NULL
)
GO
ALTER TABLE [dbo].[t_flow_task] SET (LOCK_ESCALATION = TABLE)
GO
-- ----------------------------
-- Table structure for t_flow_user
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[t_flow_user]') AND type IN ('U'))
DROP TABLE [dbo].[t_flow_user]
GO
CREATE TABLE [dbo].[t_flow_user] (
[sTaskID] varchar(64) COLLATE Chinese_PRC_CS_AI NOT NULL,
[sUserID] varchar(64) COLLATE Chinese_PRC_CS_AI NOT NULL
)
GO
ALTER TABLE [dbo].[t_flow_user] SET (LOCK_ESCALATION = TABLE)
GO
-- ----------------------------
-- Primary Key structure for table t_flow
-- ----------------------------
ALTER TABLE [dbo].[t_flow] ADD CONSTRAINT [PK__t_flow__86C9D4C189E9AADF] PRIMARY KEY CLUSTERED ([sFlowID])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
-- ----------------------------
-- Primary Key structure for table t_flow_log
-- ----------------------------
ALTER TABLE [dbo].[t_flow_log] ADD CONSTRAINT [PK__t_flow_l__614D6E049D77AD0C] PRIMARY KEY CLUSTERED ([sTaskID])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
-- ----------------------------
-- Primary Key structure for table t_flow_task
-- ----------------------------
ALTER TABLE [dbo].[t_flow_task] ADD CONSTRAINT [PK__t_flow_t__614D6E04FF2CC427] PRIMARY KEY CLUSTERED ([sTaskID])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
-- ----------------------------
-- Primary Key structure for table t_flow_user
-- ----------------------------
ALTER TABLE [dbo].[t_flow_user] ADD CONSTRAINT [PK__t_flow_u__C31E122F64EE96BC] PRIMARY KEY CLUSTERED ([sTaskID], [sUserID])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment