liquibase

LiquiBase实战总结

こ雲淡風輕ζ 提交于 2019-11-27 10:03:18
LiquiBase概述 转载 https://blog.csdn.net/Netbug_NB/article/details/40075493 Liquibase是一个用于跟踪、管理和应用数据库变化的开源的数据库重构工具。它将所有数据库的变化(包括结构和数据)都保存在XML文件中,便于版本控制。 Liquibase具备如下特性: * 不依赖于特定的数据库,目前支持包括Oracle/Sql Server/DB2/MySql/Sybase/PostgreSQL/Caché等12种数据库,这样在数据库的部署和升级环节可帮助应用系统支持多数据库。 * 提供数据库比较功能,比较结果保存在XML中,基于该XML你可用Liquibase轻松部署或升级数据库。 * 以XML存储数据库变化,其中以作者和ID唯一标识一个变化(ChangSet),支持数据库变化的合并,因此支持多开发人员同时工作。 * 在数据库中保存数据库修改历史(DatabaseChangeHistory),在数据库升级时自动跳过已应用的变化(ChangSet)。 * 提供变化应用的回滚功能,可按时间、数量或标签(tag)回滚已应用的变化。通过这种方式,开发人员可轻易的还原数据库在任何时间点的状态。 * 可生成数据库修改文档(HTML格式) * 提供数据重构的独立的IDE和Eclipse插件。

Spring Boot 2.x 中的 Actuator

﹥>﹥吖頭↗ 提交于 2019-11-27 02:22:19
1. 前言 Spring Boot 提供了很多开箱即用的starter,其中有一款非常特别的starter——actuator 。它是用来对Spring Boot 应用进行监控、指标采集、管理,并提供一些很有用的端点(endpoint)来实现上述功能。这有助于我们对Spring Boot 应用进行监视和管理。我们本文将探讨Spring Boot 2.x下的actuator的一些知识点。 2. 集成 像其它starter一样,通过非常简单的依赖集成即可开箱即用。我们通过在项目中引入(以maven为例): <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> 3. endpoints Actuator的核心是端点(endpoint),我们通过端点来获取应用的一些监控信息或者通过端点来改变系统的一些状态。Actuator中内置了非常多的端点: id 描述 默认是否启用 auditevents 显示当前应用程序的审计事件信息 Yes beans 显示应用Spring Beans的完整列表 Yes caches 显示可用缓存信息 Yes conditions 显示自动装配类的状态及及应用信息 Yes

Liquibase checksum validation error without any changes

☆樱花仙子☆ 提交于 2019-11-27 01:13:56
问题 Maven fires liquibase validation fail even no changes was made in changeset. My database is oracle. Situation: In DB changelog table was record for changeset <changeSet id="1" author="me" dbms="oracle"> ; Then by mistake i added another changeset <changeSet id="1" author="me" dbms="hsqldb"> Reruned liquibase scripts Maven fired checksum validation error. Then i changed hsqldb changeSet to <changeSet id="2" author="me" dbms="hsqldb"> Maven still firing checksum validation error. Then i changed

Hibernate using JPA (annotated Entities) and liquibase

家住魔仙堡 提交于 2019-11-26 22:21:10
问题 liquibase is a perfect alternative to hibernate's hbm2ddl_auto property if you are using xml-mapping. But Im using JPA annotation (hibernate annotations). Is it possible to use liquibase then? 回答1: Yes, Liquibase uses hibernate's metadata classes, which are the same whether you use xml mappings or annotations. You do need a hibernate config file to point liquibase to, but your mappings can be xml or jpa annotations. More information can be found at https://github.com/liquibase/liquibase

comparing databases and generating sql script using liquibase

ε祈祈猫儿з 提交于 2019-11-26 18:54:15
I'm comparing two databases using liquibase integrated with ant. But the output it is generating is like generic format. It is not giving sql statements. Please can anyone tell me how compare two databases using liquibase integrated with ant or command line utility. Mark O'Connor Obtaining the SQL statements, representing the diff between two databases, is a two step operation: Generate the XML "diff" changelog Generate SQL statements Example This example requires a liquibase.properties file (simplifies the command-line parameters): classpath=/path/to/jdbc/jdbc.jar driver=org.Driver url=jdbc

Liquibase lock - reasons?

佐手、 提交于 2019-11-26 18:44:58
问题 I get this when running a lot of liquibase-scripts against a Oracle-server. SomeComputer is me. Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Liquibase Update Failed: Could not acquire change log lock. Currently locked by SomeComputer (192.168.15.X) since 2013-03-20 13:39 SEVERE 2013-03-20 16:59:liquibase: Could not acquire

comparing databases and generating sql script using liquibase

▼魔方 西西 提交于 2019-11-26 06:40:02
问题 I\'m comparing two databases using liquibase integrated with ant. But the output it is generating is like generic format. It is not giving sql statements. Please can anyone tell me how compare two databases using liquibase integrated with ant or command line utility. 回答1: Obtaining the SQL statements, representing the diff between two databases, is a two step operation: Generate the XML "diff" changelog Generate SQL statements Example This example requires a liquibase.properties file