Tool/script 用于 liquibase 结构 table 代
Tool/script for liquibase structure table generation
需要为我的数据库中的表生成 xml 结构。
Table:
<changeSet author="u_test" id="createTable-Building">
<createTable catalogName="structure"
remarks="A String"
schemaName="public"
tableName="person"
tablespace="A String">
<column name="address" type="varchar(255)"/>
</createTable>
</changeSet>
是否有已知的实用程序?
如果您想基于现有数据库创建 XML 变更集,有两种方法可以实现,具体取决于项目的当前状态。
如果您从未使用过 Liquibase 并想开始使用它,可以使用 Liquibase generateChangelog
命令。可以找到一个基本示例 in the Liquibase documentation.
如果您已经有了变更日志并想添加到其中,则需要有两个数据库 - 一个还没有变更,一个有变更。然后使用 Liquibase diffChangelog
命令比较两者并将所需的变更集附加到现有的变更日志中。关于 using Liquibase on an existing project.
的文档中对此有一些描述
需要为我的数据库中的表生成 xml 结构。
Table:
<changeSet author="u_test" id="createTable-Building">
<createTable catalogName="structure"
remarks="A String"
schemaName="public"
tableName="person"
tablespace="A String">
<column name="address" type="varchar(255)"/>
</createTable>
</changeSet>
是否有已知的实用程序?
如果您想基于现有数据库创建 XML 变更集,有两种方法可以实现,具体取决于项目的当前状态。
如果您从未使用过 Liquibase 并想开始使用它,可以使用 Liquibase generateChangelog
命令。可以找到一个基本示例 in the Liquibase documentation.
如果您已经有了变更日志并想添加到其中,则需要有两个数据库 - 一个还没有变更,一个有变更。然后使用 Liquibase diffChangelog
命令比较两者并将所需的变更集附加到现有的变更日志中。关于 using Liquibase on an existing project.