优化代码

pull/42/head
smallbun 2023-09-05 21:40:15 +08:00
parent c50753b3bd
commit a252dd6fe4
3 changed files with 35 additions and 63 deletions

View File

@ -1,62 +0,0 @@
<!--
eiam-common - Employee Identity and Access Management
Copyright © 2022-Present Jinan Yuanchuang Network Technology Co., Ltd. (support@topiam.cn)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd
http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/pro/liquibase-pro-4.3.xsd">
<changeSet author="TopIAM" id="1.0.2">
<!--应用分组-->
<createTable remarks="应用分组" tableName="app_group">
<column name="id_" remarks="主键ID" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name_" remarks="分组名称" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column name="code_" remarks="分组编码" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column name="is_enabled" remarks="是否启用" type="TINYINT(1)" defaultValueNumeric="0"/>
<column name="create_by" remarks="创建者" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="create_time" remarks="创建时间" type="datetime">
<constraints nullable="false"/>
</column>
<column name="update_by" remarks="修改者" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="update_time" remarks="修改时间" type="datetime">
<constraints nullable="false"/>
</column>
<column name="is_deleted" remarks="删除标记" type="TINYINT(1)" defaultValueNumeric="0">
<constraints nullable="true"/>
</column>
<column name="remark_" remarks="备注" type="TEXT"/>
</createTable>
<!--应用表添加分组字段-->
<addColumn tableName="app">
<column name="group_id" remarks="应用组ID" type="BIGINT">
<constraints nullable="false"/>
</column>
</addColumn>
</changeSet>
</databaseChangeLog>

View File

@ -24,6 +24,41 @@
http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/pro/liquibase-pro-4.3.xsd">
<!--init-->
<changeSet author="TopIAM" id="1.1.0">
<!--应用分组-->
<createTable remarks="应用分组" tableName="app_group">
<column name="id_" remarks="主键ID" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name_" remarks="分组名称" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column name="code_" remarks="分组编码" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column name="is_enabled" remarks="是否启用" type="TINYINT(1)" defaultValueNumeric="0"/>
<column name="create_by" remarks="创建者" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="create_time" remarks="创建时间" type="datetime">
<constraints nullable="false"/>
</column>
<column name="update_by" remarks="修改者" type="VARCHAR(64)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="CURRENT_TIMESTAMP" name="update_time" remarks="修改时间" type="datetime">
<constraints nullable="false"/>
</column>
<column name="is_deleted" remarks="删除标记" type="TINYINT(1)" defaultValueNumeric="0">
<constraints nullable="true"/>
</column>
<column name="remark_" remarks="备注" type="TEXT"/>
</createTable>
<!--应用表添加分组字段-->
<addColumn tableName="app">
<column name="group_id" remarks="应用组ID" type="BIGINT">
<constraints nullable="false"/>
</column>
</addColumn>
<createTable remarks="应用权限资源" tableName="app_permission_resource">
<column name="id_" remarks="主键ID" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>

View File

@ -24,7 +24,6 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd
http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/pro/liquibase-pro-4.3.xsd">
<include file="db/1.0.0-changelog.xml" relativeToChangelogFile="false"/>
<include file="db/1.0.2-changelog.xml" relativeToChangelogFile="false"/>
<include file="db/1.1.0-changelog.xml" relativeToChangelogFile="false"/>
<!-- 引入Quartz -->
<include file="org/quartz/impl/jdbcjobstore/liquibase.quartz.init.xml" relativeToChangelogFile="false"/>