2011-04-06 173 views

回答

3

您可以返回使用diffTypes标志,包括 “DATA” 的数据。见http://www.liquibase.org/documentation/diff.html

但是,Liquibase目前不能输出存储过程。为此,您需要使用不同的工具,并使用标签将它们包含在生成的更改日志中。

+0

是否有产生的程序,功能changelog以及触发的工具吗? – 2017-10-27 16:39:02

0

我昨天刚发现SQL电源架构师,这似乎是能够产生Liquibase配置: http://www.sqlpower.ca/page/architect

有关该组合的详细信息请参见这篇博客文章: http://blog.mgm-tp.com/2010/11/data-modeling-part2/

+0

看起来像sql power架构师在导出程序时遭受同样的限制。“但是,请注意,如果您打算复制更复杂的概念,如检查约束,非标准索引(例如Oracle的位图索引),触发器,视图或存储过程,Power Architect还无法自动对其进行逆向工程,必须从现有数据库中手动提取这些信息,并分别将这些概念作为特殊的“Custom SQL”语句输入到LiquiBase中。 – Ellis 2013-02-28 14:27:53

2

下载liquibase.jar,数据库驱动程序并保存到一个目录(例如:/ home/mySystem/liquibase),在命令行中将目录更改为(/ home/mySystem/liquibase)并运行以下命令:

java -jar liquibase.jar --driver=org.postgresql.Driver --classpath=postgresql-42.1.3.jar --changeLogFile=db.changelog.xml --url="jdbc:postgresql://localhost:5432/<databasename>" --username=<username> --password=<password> update 

参考链接:

http://www.liquibase.org/documentation/generating_changelogs.html

相关问题