使用difftype = data liquibase比较数据库之间的数据 [英] Compare data between databases with difftype=data liquibase

查看:446
本文介绍了使用difftype = data liquibase比较数据库之间的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试为我的数据库集成一个版本控制系统.我用的是liquibase.

I try to integrate a versioning system for my databases. I use liquibase.

我使用diff系统是因为我直接修改了sql,并且我不想报告我手动进行的更改.

I work with the diff system because I modify the sql directly and I don't want to have to report the changes I made manually.

它适用于模式,但不适用于数据.我尝试在generatechangelog上使用difftype=data,但是我不知道如何比较2个数据库数据.

It works for schemas but not really for datas. I tried to use the difftype=data on generatechangelog but I don't know how to do to compare 2 databases datas.

您有什么解决办法吗?

推荐答案

如果要比较数据库,则要使用diffChangeLog而不是generateChangeLog. GenerateChangeLog输出单个数据库的完整创建逻辑,它不比较两个数据库.

If you are comparing databses you want to use diffChangeLog rather than generateChangeLog. GenerateChangeLog outputs the full creation logic for a single database, it doesn't compare two databases.

GenerateChangeLog支持diffType = data属性,该属性将以csv或insert语句的形式输出数据库的内容,但是不支持比较两个数据库中的数据.

GenerateChangeLog supports the diffType=data attribute which will output the contents of a database as csv or insert statements, but there is no support for comparing data in two databases.

这篇关于使用difftype = data liquibase比较数据库之间的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆