Questions tagged [flyway]

Flyway by Boxfuse is an open-source database migration tool. It strongly favors simplicity and convention over configuration.

Flyway by Redgate is an open-source database migration tool. It strongly favors simplicity and convention over configuration.

It runs on Windows, macOS and Linux, Java and Android.

It is based around just 7 basic commands: Migrate, Clean, Info, Validate, Undo, Baseline and Repair.

Migrations can be written in SQL (database-specific syntax (such as PL/SQL, T-SQL, ...) is supported) or Java (for advanced data transformations or dealing with LOBs).

It has a Command-line client. If you are on the JVM, we recommend using the Java API (also works on Android) for migrating the database on application startup. Alternatively, you can also use the Maven plugin or the Gradle plugin.

And if that not enough, there are plugins available for Spring Boot, Dropwizard, Grails, Play, SBT, Ant, Griffon, Grunt, Ninja and more!

Supported databases are Oracle, SQL Server, DB2, MySQL (including Amazon RDS), Aurora MySQL, Percona XtraDB Cluster, MariaDB, PostgreSQL (including Amazon RDS and Heroku), Aurora PostgreSQL, Redshift, CockroachDB, Informix, H2, HSQLDB, Derby, SQLite, SAP HANA and Sybase ASE.

More info:

2221 questions
0
votes
1 answer

Flyway no migration script

command flyway migrate -url=jdbc:postgresql://localhost:5432/Sport -user=postgres -password=1 -locations=db does not migrate: No migrations found. Are your locations set up correctly?
0
votes
2 answers

Can flyway be used in project with manual DB changes?

We have a production system with a large DB (several hundred tables) and would like to begin using Flyway to manage DDL changes that occur through the dev cycle. However, the organization is setup in such a way that there are production DB changes…
Adam Hughes
  • 14,601
  • 12
  • 83
  • 122
0
votes
1 answer

Can I configure Flyway to run without requiring ownership of pg_stat_statements_allusers? Postgres

PostgreSQL 12.6 Flyway Maven Dependency org.flywaydb flyway-core 6.5.7 I'm using maven to kick off a flyway:clean run, specified to a remote database. I have DDL permissions, however flyway is giving the following message ERROR: must be owner of…
0
votes
1 answer

MySQL use lowercase for schema and table names. How to set default uppercase without changing lower_case_table_names variable?

I run flyway scripts DDL and DML where we use uppercase, but mysql use lowercase. Is there exist how to set default uppercase? TQ
John Smith
  • 77
  • 7
0
votes
1 answer

Flyway throws exception in java EE application

I decided to add in my application on JavaEE without frameworks Flyway support. I have configurated all in pom.xml, connections presents, but there is one problem - I get log from flyway that it can't find path to migrations. 09-Aug-2022…
0
votes
0 answers

How to generate jOOQ classes from Testcontainers database migrated with Flyway during Gradle build?

I am trying to generate jOOQ classes from a database running in docker container(Testcontainers) which will be migrated with flyway during gradle build. I am new to gradle and I created working proof of concept which does not feel right, because I…
0
votes
0 answers

Is it safe to kill and restart a running Flyway migration?

Is it safe to kill and restart a running Flyway migration, or does this risk leaving the database in an inconsistent state? We would like to run Flyway via a Kubernetes Job managed by a Helm chart that deletes and re-creates jobs under certain…
scjody
  • 959
  • 2
  • 7
  • 12
0
votes
1 answer

Flyway java version 11.0.2 upgrade

I am trying to update the the java version packaged in flyway and is currently showing the following. how do i upgrade to latest? openjdk version "11.0.2" 2019-01-15 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.2+9) OpenJDK 64-Bit Server VM…
Vipin
  • 1
0
votes
1 answer

Spring boot flyway migrations

I am using flyway for migrations in my Spring boot application. I have around 5 migration scripts with names in the below fashion: V1__initialmigrations.sql V2__alter_message_table.sql When the migrations run and I see the data in…
T Anna
  • 874
  • 5
  • 21
  • 52
0
votes
1 answer

flyway create table migration if already exists

I have a create table migration, I had to run flyway repair and because that table already exists in database I can't perform flyway migrate , it fails with Caused by: java.sql.SQLSyntaxErrorException: Table 'TABLE_NAME' already exists error…
Mark Davydov
  • 337
  • 4
  • 18
0
votes
1 answer

Running flyway to migrate db to Azure SQL db: Unable to obtain connection from database

I have a flyway script that I run to migrate my db to Azure SQL db. Looks something like this: flyway.url=jdbc:sqlserver://myazuresqlserver.database.windows.net/myazuresqldatabase;ssl=request;integratedSecurity=false;…
0
votes
1 answer

Postgres Jsonb map of objects to map of simple values

I need to migrate jsonb (Flyway migration) column from { "property1": { "type": "A", "value": "value1" }, "property2": { "type": "B", "value" "value2" } } into simplified { "property1": "value1", "property2":…
Tomáš Mika
  • 210
  • 1
  • 13
0
votes
1 answer

FlywaySqlException after upgrading from spring boot 2.6.7 to 2.7.0

After switching Spring Boot version from 2.6.7 to 2.7.0, I'm getting below error after starting the app: Invocation of init method failed; nested exception is org.flywaydb.core.internal.exception.FlywaySqlException: Unable to obtain connection from…
Sam Kadam
  • 1
  • 1
0
votes
1 answer

I am trying to create a table running flyway migration on Maria db and want to save images blob in the table?

Any idea how i can save it without writing a big sql files. The images are less than the size of MEDIUMBLOB . But writing sql to create and insert data into table is very clumsy and not maintainable. Current implementation: I am using spring boot…
0
votes
0 answers

Using Flyway not able to set variable for postgress

Good Day! PostgreSQL using flyway not able to create variable but using PostgreSQL client or command line its working well. Below code is working well in client application [like DBeaver] @set TEST = 'testing by us'; but when I add sql in flyway…
Minesh
  • 148
  • 1
  • 2
  • 17
1 2 3
99
100