From bc0d1199dfe4bc9bb37b2ac1388ab70f8324a0a4 Mon Sep 17 00:00:00 2001 From: lbw Date: Mon, 18 Sep 2023 17:35:31 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Introducing=20new=20features.=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8F=91=E5=8F=B7=E5=99=A8=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E8=AE=BE=E8=AE=A1=E5=A4=9A=E7=A7=9F=E6=88=B7?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E8=B6=85=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/sequence/range/impl/db/provider/DmSqlProvider.java | 2 +- .../sequence/range/impl/db/provider/MssqlSqlProvider.java | 2 +- .../sequence/range/impl/db/provider/MysqlSqlProvider.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/provider/DmSqlProvider.java b/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/provider/DmSqlProvider.java index c8bbe1434..a7022f433 100644 --- a/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/provider/DmSqlProvider.java +++ b/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/provider/DmSqlProvider.java @@ -30,7 +30,7 @@ public class DmSqlProvider implements SqlProvider { @Override public String getCreateTableSql() { return "CREATE TABLE #tableName (ID BIGINT NOT NULL,VALUE BIGINT NOT NULL" - + ",NAME VARCHAR (32) NOT NULL,GMT_CREATE TIMESTAMP (0) NOT NULL,GMT_MODIFIED TIMESTAMP (0) NOT NULL" + + ",NAME VARCHAR (64) NOT NULL,GMT_CREATE TIMESTAMP (0) NOT NULL,GMT_MODIFIED TIMESTAMP (0) NOT NULL" + ",NOT CLUSTER PRIMARY KEY (ID),CONSTRAINT UK_NAME UNIQUE (NAME)) STORAGE (ON MAIN,CLUSTERBTR);"; } diff --git a/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/provider/MssqlSqlProvider.java b/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/provider/MssqlSqlProvider.java index cf8ad245b..9574edfcf 100644 --- a/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/provider/MssqlSqlProvider.java +++ b/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/provider/MssqlSqlProvider.java @@ -22,7 +22,7 @@ public class MssqlSqlProvider implements SqlProvider { public String getCreateTableSql() { return "IF NOT EXISTS (\n" + "SELECT*FROM sys.all_objects WHERE object_id=OBJECT_ID(N'#tableName') AND type IN ('U')) \n" - + "CREATE TABLE #tableName (id bigint NOT NULL,VALUE bigint NOT NULL,name nvarchar (32) COLLATE " + + "CREATE TABLE #tableName (id bigint NOT NULL,VALUE bigint NOT NULL,name nvarchar (64) COLLATE " + "Chinese_PRC_CI_AS NOT NULL,gmt_create datetime2 (7) NOT NULL,gmt_modified datetime2 (7) NOT NULL) GO"; } diff --git a/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/provider/MysqlSqlProvider.java b/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/provider/MysqlSqlProvider.java index 4492cf71d..96be49088 100644 --- a/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/provider/MysqlSqlProvider.java +++ b/pigx-common/pigx-common-sequence/src/main/java/com/pig4cloud/pigx/common/sequence/range/impl/db/provider/MysqlSqlProvider.java @@ -19,7 +19,7 @@ public class MysqlSqlProvider implements SqlProvider { @Override public String getCreateTableSql() { return "CREATE TABLE IF NOT EXISTS #tableName(" + "id bigint(20) NOT NULL AUTO_INCREMENT," - + "value bigint(20) NOT NULL," + "name varchar(32) NOT NULL," + "gmt_create DATETIME NOT NULL," + + "value bigint(20) NOT NULL," + "name varchar(64) NOT NULL," + "gmt_create DATETIME NOT NULL," + "gmt_modified DATETIME NOT NULL," + "PRIMARY KEY (`id`),UNIQUE uk_name (`name`)" + ")"; }