How to use Flyway when working with feature branches

We have recently moved to using feature branches for each story we work on. These are as independent as possible, and our project manager then decides which stories will make up a release. This...

How to ignore placeholder expressions for Flyway?

I am using flyway version 2.3, I have an sql patch which inserts a varchar into a table having character sequence that Flyway treats as placeholders. I want to flyway to ignore placeholders and...

Hibernate 4 Could not obtain transaction-synchronized Session for current thread

I know it's far not a new question. For example lots of recipies can be found here both in question and replies. However, I didn't manage to solve mine. I user Hibernate 4 + Spring 4 and...

Best common practice for data insert/update scripts in flyway

scenario: I have two databases. The first database is a blank database used for testing. I essentially run flyway:migrate and build the database with complete schema and run my integration tests...

How does spring.jpa.hibernate.ddl-auto property exactly work in Spring?

I was working on my Spring boot app project and noticed that, sometimes there is a connection time out error to my Database on another server(SQL Server). This happens specially when I try to do...

Flyway: How to run certain repeatable migrations before versioned ones?

Flyway states in its documentation some of the usages for repeatable migrations: Usages: (Re-)creating views/procedures/functions/packages/... I have some triggers/functions that I want to...

flyway - The meaning of the concept of checksums

I'm learning Flyway migration tool, and I don't have clear the concept of checksums. Could someone explain me what is? how is it calculated, or how can it be changed? I understand the repair...

How do I manage schema/mapping migrations/evolutions in Elasticsearch?

Flyway is a very convenient schema migration/evolution tool in the RDBMS world. I'm looking for something similar for ES. Even though ES is different from RDBMS and I get that, the whole point of...

Unable to use Flyway migrations with Google Cloud SQL and Maven

I'm just trying to get a simple Hello World proof of concept set up, using maven, flyway, and Google Cloud SQL. See https://github.com/creyes17/mvn-flyway-cloudsql-test for the full code I'm...

Getting message "Attempt to define a second primary key". When running @DataJpaTest

I don't know exactly why, but I am getting this message from Flyway evolution in H2 database. It's a @DataJpaTest spring boot test. Seems like some dialect stuff is not being respected. Attempt to...

How to manage schema migrations in Google BigQuery

How to manage schema migrations for Google BigQuery, we have used Liquibase and Flyway in the past. What kind of tools can we use to manage schema modifications and the like (e.g. adding a new...

How to upgrade from flyway 3 directly to flyway 5

Working on a product that is deployed by many clients in many production environments. It includes at least one Spring Boot app. We've used flyway for db schema migrations. Upgrading from Spring...

Flyway can't find classpath:db/migrations

I just started right now a new project in Intellij using Spring Boot ver 2.1.3 and Flyway 5.2.4 with Java 11. After try to start my project i got : Caused by:...

Slick access to DataSource Programmatically

I have a object like this : object DatabaseFactory { import slick.jdbc.PostgresProfile.api._ private val db = Database.forConfig("database.postgresql") def getDatabase = db } and a...

Flyway Found more than one migration with version

I've two sql files , one for oracle and one for mySql database. Path is as follows db/migration/mysql/V1_1_migration.sql db/migration/oracle/V1_1_migration.sql while running the test , I'm...

BeanCreationException: Error creating bean with name 'flywayInitializer'

I am trying to run my project tests in a docker container. All of the tests work just fine when running locally. Errors started occurring when I tried to move my testing to docker container. Here...

Validate failed: Detected applied migration not resolved locally | Flyway

While setting up flyway i am getting this error in my spring-boot app org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class...

Is it possible to use feature flags/toggles when feature modify database?

This problem confuses me the most when thinking about using feature toggles in applications. Most of the features require some changes in database. How then feature flag can be implemented to be...

Pivotal Web Services: Flyway Enterprise Edition or MySQL upgrade required

I get the following message when deploying my Spring Boot Application to Pivotal Web Services with a MySQL cleardb spark...

Flyway Migrations fails when passing Environment Variables to Docker

Performing database migrations using flyway. Using the dockerized version and using conf files for mirgations configurations. Below is my config file flyway.url =...

Spring Boot Application is not running Flyway migrations on startup

I have a Spring Boot Application with a couple Entity classes and I'm trying to implement database migrations with flyway. It appears that, on startup, Spring Boot is not running flyway at...

Flyway 6 JavaMigrations with Native Dependency Injection for Spring Beans

I have seen many great workarounds to create Flyway JavaMigrations and injecting Spring Beans using @DependsOn and ApplicationContextAware (e.g....

Flyway and Jenkin integeration using location from github path

I want to integerate Jenkins and Flyway, and I did it successfully but now instead of choosing flyway scripts from /sql path, i want to look scripts from github path and then run flyway on...

How To Manually Sync Database From Development To Production Server

Server/IP Address: Development Server: www-dev (172.22.12.42, Debian 10) Administration Server for www-dev: www-admin (172.22.69.25, Debian 10) Production Server: graysonpeddie.com...

Flyway Locations Property Not Being Set

Flyway does not seem to be able to resolve classpath, despite the migrations being in there. What am I doing wrong here? ➜ my-project git:(main) ✗ flyway migrate Flyway Community Edition...

Flyway Core with Spring Boot gives error Circular depends-on relationship between 'delayedFlywayInitializer' and 'entityManagerFactory'

I want to import some data on the SQL server database, I'm using Spring Boot 2.3.4. I use also Hibernate to generate the tables. I added flyway core in pom: ...

Flyway and PostgreSQL nullable definition of foreign key still generates a non-null constraint

I use Spring Boot and Flyway with this initialization script: CREATE TABLE ADDRESS( ID bigserial NOT NULL PRIMARY KEY ); CREATE TABLE ROLE( ID bigserial NOT NULL...

Does cf run-task need env/script uploaded befrore running? An elegant way?

I'm working with cloud foundry. My need is to run a database migration aside from my application so that I can trigger the migration in some way (cf command, api call, etc) when I need. I was...

Flyway - Create users with password in the postgres database using flyway by referring username and password from AWS ssm parameter and secrets manage

I am currently using ansible to create users with password in the AWS postgres database by referring the username and password stored in ssm parameter and secrets manager respectively. We are...

Flyway - auto increment id not working with test data in PostgreSQL

Before I added Flyway to my project, I could run POST request and the new user was created successfully with ID = 1, next one ID = 2 etc. Then I added Flyway to create tables and insert some test...