liquibase

Liquibase - checksum differs with different database vendors

家住魔仙堡 提交于 2019-12-23 20:35:10
问题 I have a problem with Liquibase checksum when I try to run it on MSSQL and MySQL. In my MSSQL-base I have a changelog-entry with this checksum: 3:cf2f5de7a1dcc738bbc185e25fbcf6c9 When I run my liquibase against this database, it works just fine. Then, I copy the changelog-entry to my MySQL-database and try to run, and get this error: myLiquibase.xml::1::Tobb is now: 3:cedf7a8ba54ea3f83141f79 I have tried setting the checksum to null in my MSSQL in order to regenerate the checksum, and the

Spring liquibase recover when application is crashed

风流意气都作罢 提交于 2019-12-23 15:19:41
问题 I have spring boot application which have defined database migrations using liquibase. When I start application script wait 500s and check http status of application. When it returns error code script kills application process and try to start application again. Application is killed during starting sometimes and liquibase don't remove records from databasechangeloglock . When application runs next time it wait for release lock, but it doesn't happen and application is killed again and again.

Liquibase refuses to create a database that doesn't exist

假如想象 提交于 2019-12-23 12:02:05
问题 I'm trying to run liquibase update on a database that doesn't exist yet. I would expect it to create the database for me (I'm running with root, so it shouldn't be a problem), but instead I'm getting: /vagrant/liquibase$ ./liquibase update Liquibase Home is not set. Liquibase Home: /vagrant/liquibase Liquibase update Failed: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'test_project' 回答1: Connection url parameters to the rescue again! url: jdbc:mysql://localhost

Disable Liquibase temporarily in JHipster 2.26

耗尽温柔 提交于 2019-12-23 11:46:03
问题 I am using JHipster as a tool to teach Software Engineering. I would like to teach JHipster incrementally to soften the learning curve . In this regard, please, I'd like to know the smartest way to temporarily disable Liquibase . I prefer to use the JPA2 DDL auto functionality at the begining of the Academic course (https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html#howto-initialize-a-database-using-jpa) . Thank you very much for this awesome

Liquibase 3.0.1 Gradle integration

旧时模样 提交于 2019-12-23 06:07:37
问题 We're using liquibase for database versioning and gradle as build tool. Currently we use liquibase in version 2.0.5 com.augusttechgroup:gradle-liquibase-plugin:0.7 Due to a bug in liquibase which was fixed in 2.0.5 we're forced to go to version 3.0.x. Unfortunately the gradle plugin doesn't work anymore. :dropAll Liquibase Update Failed: liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava

“Unexpected error running Liquibase: Unknown Reason” liquibase 3.3.5 and grails war file

為{幸葍}努か 提交于 2019-12-23 03:34:12
问题 This is the command I am running: java -jar /root/liquibase/liquibase.jar \ --driver=com.mysql.jdbc.Driver \ --logLevel=debug \ --changeLogFile=migrations/changelog.xml \ --classpath=/usr/share/tomcat7/lib/mysql.jar:/var/lib/tomcat7/webapps/myApp.war \ --url="jdbc:mysql://127.0.0.1:3306/mydb" \ --username=myuser \ --password=mypass \ --contexts=MYCONTEXT \ update this fails with the following unhelpful error message: Unexpected error running Liquibase: Unknown Reason SEVERE 9/9/15 2:23 PM:

Best choice to generate scripts for different databases [closed]

风流意气都作罢 提交于 2019-12-23 03:28:32
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . I am wondering on how to generate scripts (DDL, DML) from an specific template to different databases, like Oracle, MSSQL, Sybase. Liquibase seems to fit, but is there any framework or way to do it? 回答1: The following example generates SQL for the H2 database. The XML

Liquibase execution order of changeset files when using includeAll with classpath*:

无人久伴 提交于 2019-12-23 00:26:20
问题 I am using liquibase (3.1.1) in a spring environment (3.2.x) and load the changesets via the inlcudeAll tag in a master file. There I use the "classpath*:/package/to/changesets" as path. <?xml version="1.0" encoding="UTF-8"?> <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 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd"> <includeAll path

Grails database-migration with property to be db agnostic

拈花ヽ惹草 提交于 2019-12-22 12:08:14
问题 Is there a way in the Grails-database migration plugin to define properties in migration files to be able to define database agnostic migration, like it is possible in Liquibase? I tried with: databaseChangeLog = { property([name:"boolean.type", value:"bit(1)",dbms:"mysql" ]) property([name:"boolean.type", value:"number(1,0)", dbms:"oracle"]) ... } an using it in the colum definition: changeSet(author: "me", id: "121112341-1") { createTable(tableName: "test_table") { ... column(name: "my

Grails database-migration with property to be db agnostic

早过忘川 提交于 2019-12-22 12:08:07
问题 Is there a way in the Grails-database migration plugin to define properties in migration files to be able to define database agnostic migration, like it is possible in Liquibase? I tried with: databaseChangeLog = { property([name:"boolean.type", value:"bit(1)",dbms:"mysql" ]) property([name:"boolean.type", value:"number(1,0)", dbms:"oracle"]) ... } an using it in the colum definition: changeSet(author: "me", id: "121112341-1") { createTable(tableName: "test_table") { ... column(name: "my