<#if dataBase == 'Oracle'>
<#list module.tables as table>
-- ----------------------------
-- Table structure for ${table.tableName} - ${table.tableComment?default("")}
-- Target   : Oracle
-- Author   : ${author}
-- Date:    : ${.now?string["yyyy-MM-dd"]}
-- ----------------------------
CREATE TABLE "${module.modulePrefix?default("")}${table.tableName}" (
<#list table.fields as field>
${dBmapper.getFieldSql(field)}<#if field_has_next>,</#if>
</#list>
);
COMMENT ON TABLE "${module.modulePrefix?default("")}${table.tableName}" is '${table.tableComment?default("")}';
    <#list table.fields as field>
COMMENT ON COLUMN "${module.modulePrefix?default("")}${table.tableName}"."${field.fieldName?default("")}" is '${field.fieldComment?default("")}';
    </#list>

</#list>
</#if>
<#if dataBase == 'MySQL'>
<#list module.tables as table>
-- ----------------------------
-- Table structure for ${table.tableName} - ${table.tableComment?default("")}
-- Target   : MySQL
-- Author   : ${author}
-- Date:    : ${.now?string["yyyy-MM-dd"]}
-- ----------------------------
CREATE TABLE `${module.modulePrefix?default("")}${table.tableName}` (
<#list table.fields as field>
    ${dBmapper.getFieldSql(field)}<#if field_has_next||table.sys>,</#if>
</#list>
<#if table.sys>
PRIMARY KEY (`ID`)
</#if>
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='${table.tableComment?default("")}';

</#list>
</#if>
<#if dataBase == 'SQLite'>
<#list module.tables as table>
-- ----------------------------
-- Table structure for ${table.tableName} - ${table.tableComment?default("")}
-- Target   : SQLite
-- Author   : ${author}
-- Date:    : ${.now?string["yyyy-MM-dd"]}
-- ----------------------------
CREATE TABLE IF NOT EXISTS ${module.modulePrefix?default("")}${table.tableName} (
    <#list table.fields as field>
    ${dBmapper.getFieldSql(field)}<#if field_has_next>,</#if>
    </#list>
);

</#list>
</#if>
