mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-16 03:55:06 +08:00
适配 Oracle 数据库
1. 适配表名是大写的情况 2. 优化代码生成器的校验逻辑
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
-- 将该建表 SQL 语句,添加到 yudao-module-${table.moduleName}-biz 模块的 test/resources/sql/create_tables.sql 文件里
|
||||
CREATE TABLE IF NOT EXISTS "${table.tableName}" (
|
||||
CREATE TABLE IF NOT EXISTS "${table.tableName.toLowerCase()}" (
|
||||
#foreach ($column in $columns)
|
||||
#if (${column.javaType} == 'Long')
|
||||
#set ($dataType='bigint')
|
||||
@ -24,11 +24,11 @@ CREATE TABLE IF NOT EXISTS "${table.tableName}" (
|
||||
#elseif (${column.columnName} == 'deleted')
|
||||
"deleted" bit NOT NULL DEFAULT FALSE,
|
||||
#else
|
||||
"${column.columnName}" ${dataType}#if (${column.nullable} == false) NOT NULL#end,
|
||||
"${column.columnName.toLowerCase()}" ${dataType}#if (${column.nullable} == false) NOT NULL#end,
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
PRIMARY KEY ("${primaryColumn.columnName}")
|
||||
PRIMARY KEY ("${primaryColumn.columnName.toLowerCase()}")
|
||||
) COMMENT '${table.tableComment}';
|
||||
|
||||
-- 将该删表 SQL 语句,添加到 yudao-module-${table.moduleName}-biz 模块的 test/resources/sql/clean.sql 文件里
|
||||
|
Reference in New Issue
Block a user