Commit 7d9e6f2184ef0cd03c0a50e8fe69a731eaeaa759

Authored by dhb52
1 parent c52ec92b

fix: pg,mssql dual表需要一条数据

sql/postgresql/ruoyi-vue-pro.sql
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 5
6 Target Server Type : PostgreSQL 6 Target Server Type : PostgreSQL
7 7
8 - Date: 2024-05-03 23:36:19 8 + Date: 2024-05-08 00:11:06
9 */ 9 */
10 10
11 11
@@ -15,8 +15,17 @@ @@ -15,8 +15,17 @@
15 DROP TABLE IF EXISTS dual; 15 DROP TABLE IF EXISTS dual;
16 CREATE TABLE dual 16 CREATE TABLE dual
17 ( 17 (
  18 + id int2
18 ); 19 );
19 20
  21 +COMMENT ON TABLE dual IS '数据库连接的表';
  22 +
  23 +-- ----------------------------
  24 +-- Records of dual
  25 +-- ----------------------------
  26 +-- @formatter:off
  27 +INSERT INTO dual VALUES (1);
  28 +-- @formatter:on
20 29
21 -- ---------------------------- 30 -- ----------------------------
22 -- Table structure for infra_api_access_log 31 -- Table structure for infra_api_access_log
sql/sqlserver/ruoyi-vue-pro.sql
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 5
6 Target Server Type : Microsoft SQL Server 6 Target Server Type : Microsoft SQL Server
7 7
8 - Date: 2024-05-03 23:36:38 8 + Date: 2024-05-08 00:22:09
9 */ 9 */
10 10
11 11
@@ -17,7 +17,7 @@ GO @@ -17,7 +17,7 @@ GO
17 17
18 CREATE TABLE dual 18 CREATE TABLE dual
19 ( 19 (
20 - id int NULL 20 + id int
21 ) 21 )
22 GO 22 GO
23 23
@@ -27,6 +27,13 @@ EXEC sp_addextendedproperty @@ -27,6 +27,13 @@ EXEC sp_addextendedproperty
27 'TABLE', N'dual' 27 'TABLE', N'dual'
28 GO 28 GO
29 29
  30 +-- ----------------------------
  31 +-- Records of dual
  32 +-- ----------------------------
  33 +-- @formatter:off
  34 +INSERT INTO dual VALUES (1)
  35 +GO
  36 +-- @formatter:on
30 37
31 -- ---------------------------- 38 -- ----------------------------
32 -- Table structure for infra_api_access_log 39 -- Table structure for infra_api_access_log
sql/tools/convertor.py
@@ -207,7 +207,6 @@ class Convertor(ABC): @@ -207,7 +207,6 @@ class Convertor(ABC):
207 -- Table structure for dual 207 -- Table structure for dual
208 -- ---------------------------- 208 -- ----------------------------
209 {dual} 209 {dual}
210 -  
211 """ 210 """
212 ) 211 )
213 212
@@ -371,7 +370,17 @@ CREATE SEQUENCE {table_name}_seq @@ -371,7 +370,17 @@ CREATE SEQUENCE {table_name}_seq
371 return """DROP TABLE IF EXISTS dual; 370 return """DROP TABLE IF EXISTS dual;
372 CREATE TABLE dual 371 CREATE TABLE dual
373 ( 372 (
374 -);""" 373 + id int2
  374 +);
  375 +
  376 +COMMENT ON TABLE dual IS '数据库连接的表';
  377 +
  378 +-- ----------------------------
  379 +-- Records of dual
  380 +-- ----------------------------
  381 +-- @formatter:off
  382 +INSERT INTO dual VALUES (1);
  383 +-- @formatter:on"""
375 384
376 385
377 class OracleConvertor(Convertor): 386 class OracleConvertor(Convertor):
@@ -636,7 +645,7 @@ GO @@ -636,7 +645,7 @@ GO
636 645
637 CREATE TABLE dual 646 CREATE TABLE dual
638 ( 647 (
639 - id int NULL 648 + id int
640 ) 649 )
641 GO 650 GO
642 651
@@ -644,7 +653,15 @@ EXEC sp_addextendedproperty @@ -644,7 +653,15 @@ EXEC sp_addextendedproperty
644 'MS_Description', N'数据库连接的表', 653 'MS_Description', N'数据库连接的表',
645 'SCHEMA', N'dbo', 654 'SCHEMA', N'dbo',
646 'TABLE', N'dual' 655 'TABLE', N'dual'
647 -GO""" 656 +GO
  657 +
  658 +-- ----------------------------
  659 +-- Records of dual
  660 +-- ----------------------------
  661 +-- @formatter:off
  662 +INSERT INTO dual VALUES (1)
  663 +GO
  664 +-- @formatter:on"""
648 665
649 666
650 class DM8Convertor(Convertor): 667 class DM8Convertor(Convertor):