From 7d9e6f2184ef0cd03c0a50e8fe69a731eaeaa759 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Wed, 8 May 2024 00:28:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20pg,mssql=20dual=E8=A1=A8=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E4=B8=80=E6=9D=A1=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/postgresql/ruoyi-vue-pro.sql | 11 ++++++++++- sql/sqlserver/ruoyi-vue-pro.sql | 11 +++++++++-- sql/tools/convertor.py | 25 +++++++++++++++++++++---- 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/sql/postgresql/ruoyi-vue-pro.sql b/sql/postgresql/ruoyi-vue-pro.sql index 980cd790a..526d5a40d 100644 --- a/sql/postgresql/ruoyi-vue-pro.sql +++ b/sql/postgresql/ruoyi-vue-pro.sql @@ -5,7 +5,7 @@ Target Server Type : PostgreSQL - Date: 2024-05-03 23:36:19 + Date: 2024-05-08 00:11:06 */ @@ -15,8 +15,17 @@ DROP TABLE IF EXISTS dual; CREATE TABLE dual ( + id int2 ); +COMMENT ON TABLE dual IS '数据库连接的表'; + +-- ---------------------------- +-- Records of dual +-- ---------------------------- +-- @formatter:off +INSERT INTO dual VALUES (1); +-- @formatter:on -- ---------------------------- -- Table structure for infra_api_access_log diff --git a/sql/sqlserver/ruoyi-vue-pro.sql b/sql/sqlserver/ruoyi-vue-pro.sql index 26e674498..86ff9a37e 100644 --- a/sql/sqlserver/ruoyi-vue-pro.sql +++ b/sql/sqlserver/ruoyi-vue-pro.sql @@ -5,7 +5,7 @@ Target Server Type : Microsoft SQL Server - Date: 2024-05-03 23:36:38 + Date: 2024-05-08 00:22:09 */ @@ -17,7 +17,7 @@ GO CREATE TABLE dual ( - id int NULL + id int ) GO @@ -27,6 +27,13 @@ EXEC sp_addextendedproperty 'TABLE', N'dual' GO +-- ---------------------------- +-- Records of dual +-- ---------------------------- +-- @formatter:off +INSERT INTO dual VALUES (1) +GO +-- @formatter:on -- ---------------------------- -- Table structure for infra_api_access_log diff --git a/sql/tools/convertor.py b/sql/tools/convertor.py index fe12caed1..1ca575769 100644 --- a/sql/tools/convertor.py +++ b/sql/tools/convertor.py @@ -207,7 +207,6 @@ class Convertor(ABC): -- Table structure for dual -- ---------------------------- {dual} - """ ) @@ -371,7 +370,17 @@ CREATE SEQUENCE {table_name}_seq return """DROP TABLE IF EXISTS dual; CREATE TABLE dual ( -);""" + id int2 +); + +COMMENT ON TABLE dual IS '数据库连接的表'; + +-- ---------------------------- +-- Records of dual +-- ---------------------------- +-- @formatter:off +INSERT INTO dual VALUES (1); +-- @formatter:on""" class OracleConvertor(Convertor): @@ -636,7 +645,7 @@ GO CREATE TABLE dual ( - id int NULL + id int ) GO @@ -644,7 +653,15 @@ EXEC sp_addextendedproperty 'MS_Description', N'数据库连接的表', 'SCHEMA', N'dbo', 'TABLE', N'dual' -GO""" +GO + +-- ---------------------------- +-- Records of dual +-- ---------------------------- +-- @formatter:off +INSERT INTO dual VALUES (1) +GO +-- @formatter:on""" class DM8Convertor(Convertor):