1. 将 column_type 调整成 data_type 字段

2. 完善 Oracle 的字段映射
This commit is contained in:
YunaiV
2022-04-29 00:51:43 +08:00
parent 6b68aa95fe
commit 3e869a07fd
9 changed files with 21 additions and 26 deletions

View File

@ -2,18 +2,18 @@
CREATE TABLE IF NOT EXISTS "${table.tableName}" (
#foreach ($column in $columns)
#if (${column.primaryKey})##处理主键
"${column.javaField}"#if (${column.javaType} == 'String') ${column.columnType} NOT NULL#else ${column.columnType} NOT NULL GENERATED BY DEFAULT AS IDENTITY#end,
"${column.javaField}"#if (${column.javaType} == 'String') ${column.dataType} NOT NULL#else ${column.dataType} NOT NULL GENERATED BY DEFAULT AS IDENTITY#end,
#else
#if (${column.columnName} == 'create_time')
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
#elseif (${column.columnName} == 'update_time')
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
#elseif (${column.columnName} == 'creator' || ${column.columnName} == 'updater')
"${column.columnName}" ${column.columnType} DEFAULT '',
"${column.columnName}" ${column.dataType} DEFAULT '',
#elseif (${column.columnName} == 'deleted')
"deleted" bit NOT NULL DEFAULT FALSE,
#else
"${column.columnName}" ${column.columnType}#if (${column.nullable} == false) NOT NULL#end,
"${column.columnName}" ${column.dataType}#if (${column.nullable} == false) NOT NULL#end,
#end
#end
#end