liquibase

H2 update with join

我怕爱的太早我们不能终老 提交于 2019-12-30 08:26:08
问题 As development DB I am using MySQL, and for tests I am using H2 database. The following script works in MySQL very well, but it is fails on H2. UPDATE `table_a` JOIN `table_b` ON `table_a`.id=`table_b`.a_id SET `table_a`.b_id=`table_b`.id In the internet I found that h2 doesn't support UPDATE clause with JOIN . Maybe there is a way to rewrite this script without JOIN clause? By the way, I am using liquibase. Maybe I can write UPDATE clause with it's xml language? I tried the following script

How to configure liquibase not to include file path or name for calculating checksum?

蓝咒 提交于 2019-12-30 05:59:04
问题 I found that liquibase uses the full path of the change log file to calculate the checksum. This behavior restricts to modify change log file names and tries to reapply the change sets again once renamed the file. Is there a way to configure liquibase to use only the changelog id to calculate cuecksum? Please provide your valuable thoughts. 回答1: Use the attribute logicalFilePath of the databaseChangeLog tag. 回答2: Upstream developers recommend use logicalFilePath and suggest to perform direct

How to configure liquibase not to include file path or name for calculating checksum?

放肆的年华 提交于 2019-12-30 05:59:00
问题 I found that liquibase uses the full path of the change log file to calculate the checksum. This behavior restricts to modify change log file names and tries to reapply the change sets again once renamed the file. Is there a way to configure liquibase to use only the changelog id to calculate cuecksum? Please provide your valuable thoughts. 回答1: Use the attribute logicalFilePath of the databaseChangeLog tag. 回答2: Upstream developers recommend use logicalFilePath and suggest to perform direct

Can Flyway or Liquibase generate an update script instead of updating the database directly?

此生再无相见时 提交于 2019-12-30 02:45:07
问题 First, a little background. I have a set of Java applications, some based on JPA, some not. To create my databases I am currently using Hibernates schema export to generate create scripts for those using JPA. Those not using JPA I generate the scripts by hand. These are then run during application installation using ANT. For updates the application installer simply applies update scripts to the database. To improve the management of database updates I have been looking at Flyway and Liquibase

Flyway and liquibase together? [closed]

浪子不回头ぞ 提交于 2019-12-30 00:28:27
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I've looked at both Liquibase and Flyway individually and on an individual comparison alone, Liquibase seems like the better tool for our needs. Some sources mention using both Liquibase and Flyway together. Liquibase seems to have everything Flyway has and more flexibility when it

liquibase using maven with two databases does not work

白昼怎懂夜的黑 提交于 2019-12-29 01:38:13
问题 This post describes how to update two databases from maven using liquibase: liquibase using maven with two databases However, when I try the exact same configuration in my pom.xml (included below) it does not work. I get this error when running 'mvn liquibase:update': The driver has not been specified either as a parameter or in a properties file. Running with verbose set to true I get: [INFO] Settings---------------------------- [INFO] driver: null [INFO] url: null [INFO] username: null

Exception using liquibase from Java with Derby Embedded

烂漫一生 提交于 2019-12-25 18:27:41
问题 I'm making Liquibase migration using groovy script. I have a code like def migrate() { def changeLog = "com/cadence/mdv/ngv/db.changelog.xml" Sql db = Sql.newInstance(profile.dbUrl, profile.dbUser, profile.dbPassword, profile.dbDriver) Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(db.connection)) def liquibase = new Liquibase(changeLog , new ClassLoaderResourceAccessor() , database ) liquibase.update(null) } But I receive exception,

Liquibase - multiple datasources in a mixed order

泪湿孤枕 提交于 2019-12-25 06:28:49
问题 It is said that we can run multiple datasources with the below spring beans <bean id="liquibase1" class="liquibase.integration.spring.SpringLiquibase"> <property name="dataSource" ref="dataSource1" /> <property name="changeLog" value="classpath:db1-changelog.xml" /> </bean> <bean id="liquibase2" class="liquibase.integration.spring.SpringLiquibase"> <property name="dataSource" ref="dataSource2" /> <property name="changeLog" value="classpath:db2-changelog.xml" /> </bean> or with the below pom

Recommended to record all liquibase changesets in one database when managing multiple databases?

我是研究僧i 提交于 2019-12-25 02:37:21
问题 I am working with an existing application that has two different databases that it uses, and a bunch of pre-existing SQL statements. The databases are: App Logging They do not share a schema but they both are used while the app is running. QUESTION: Is it OK, preferred, or frowned upon to record all change sets under one of the databases? Here is some background. When I first started testing liquibase against these, I was trying to select the database at runtime and was running into errors,

liquibase databasechangelog table in updateSql mode

杀马特。学长 韩版系。学妹 提交于 2019-12-25 00:17:50
问题 When I generate a SQL file out of my changelog file the databasechangelog table is created as a CSV file in the same folder as my generated SQL file but I want it as a table inside of my SQL file. I use liquibase 3.5.5. via command line and used this command: .\liquibase --url=offline:mssql? ` --changeLogFile="C:\Users\Ferid\Documents\Box Sync\PRIVATE_Ferid\liquibase-3.5.5-bin\Changelog.xml" ` --outputFile="C:\Users\Ferid\Documents\Box Sync\PRIVATE_Ferid\liquibase-3.5.5-bin\all.sql" `