Flyway

How to use HikariCP in Spring Boot with two datasources in conjunction with Flyway

五迷三道 提交于 2020-01-01 01:41:09
问题 I want to use HikariCP as JDBC connection pool in my Spring boot application. I have two datasources (MySQL database as the primary database and accessing those data through Hibernate and additionally an Oracle database for reading some other data through JDBCTemplate). I set the MySQL datasource as primary bean: @Bean @Primary @ConfigurationProperties("spring.datasource") public DataSourceProperties mySQLDataSourceProperties() { return new DataSourceProperties(); } @Bean @Primary

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

Flywaydb integration

最后都变了- 提交于 2019-12-25 13:45:51
问题 I am trying to integrate Flyway migration into my project (portlet - maven build) but I cannot figure out how to do all the necessary steps - could you please take a look on what I have done so far and advice what am I missing, please? I read the documentation and some examples but there is no complete tutorial how to set it up from scratch: Here is what I have done: 1) Added dependencies in pon.xml <dependency> <groupId>com.googlecode.flyway</groupId> <artifactId>flyway-core</artifactId>

Changin DB transaction control in flyway with hsql

空扰寡人 提交于 2019-12-25 03:14:08
问题 In HSQL to change TRANSACTION CONTROL there can't be any active transactions. Flyway, in turn, after committing migration X and before executing SQL from migration X, sets autocommitt=false and executes some of its own statements. So if the migration contains SET DATABASE TRANSACTION CONTROL statement it will wait for those uncommitted statements forever causing application to hang. (Side note: The statements executed by flyway before migration varies from version to version e.g. in 1.7 that

Creating a DDL for a baseline for flyway

让人想犯罪 __ 提交于 2019-12-25 00:36:48
问题 I've got an oracle 11 XE database, with 3 schemas in it, that I want to create a DDL file for to make a baseline script to use with flyway. I've tried to export just the DDL of all 3 schemas, but the resulting sql doesn't include the creation of the users, or the creation of the tablespaces. It just starts off with sql to create tables, which will not work as the users or the tablespaces don't exist. Is there any way to do this with sql-developer or am I using the wrong tool for the job here?

How to handle Oracle synonyms with Flyway 2.0.1?

心不动则不痛 提交于 2019-12-24 20:17:17
问题 I'm using flyway for a long time now. Very nice/complete tool! I'm actually facing an unexpected situation... I have two schemas: An Owner pocessing the tables and sequences A User using synonyms to access the Owner objects The custom does not want me to give the 'grant create any synonym / drop any synonym' rights to the Owner. But I can provide the 'grant create synonym' to the User. So I need to Create the tables/sequences (connected with the Owner) Grant Select, Delete... to my User

Is there any way to run Flyway task excluding some tables?

∥☆過路亽.° 提交于 2019-12-24 15:06:59
问题 I'm currently using Flyway to manage migrations on an application which uses Postgis (PostgreSQL geospatial extension). This plugin uses a table called spatial_ref_sys which is located in the same schema the application uses too, when I call mvn flyway:clean I'm getting an error indicating that Flyway was unable to delete this table (it was created using user postgres); if I change the owner to my application database user, then the error changes to: ERROR: cannot drop table spatial_ref_sys

SBT ResolveException for org.flywaydb#flyway-sbt;3.1

牧云@^-^@ 提交于 2019-12-24 12:15:58
问题 I've been trying to use sbt for compiling the source code of a server app, written in scala. When I run the sbt script, it starts downloading some packages and resolving some dependencies and at the final step, it returns the following error: sbt.ResolveException: unresolved dependency: org.flywaydb#flyway-sbt;3.1:not found And if I ignore this error, I can't use commands like "compile", ... I have compiled this source code before using sbt on ubuntu 14.04 and used the commands I needed, but

Cannot run shell (which) command in PHP code

老子叫甜甜 提交于 2019-12-24 08:52:46
问题 So I am working with Flyway and I run specific commands using PHP exec() function: exec('/path/absolute/flyway info'); These commands work as long as I specify the absolute path, but that may vary depending on the machines that it will be working on. That is why I want to use a variable which determines that absolute path, through the command exec('which flyway') . The thing is that this returns a null value, even though when I write it directly in shell I get the desired result. I also tried