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
0 answers

migrations with percona toolkit

I have not been able to see the documentation if it is compatible with percona toolkit or not. We have been testing Liquibase but the only way to use percona is through XML or YAML files and it doesn't seem logical to me, since developers use SQL…
pucara
  • 1
0
votes
1 answer

podSecurityContext not working as expected on init container

For the first time I am trying to set pod security context. I added the following to the pod spec: securityContext: fsGroup: 2000 runAsNonRoot: true And when the pod is trying to come up, the init container is stuck in state…
jrz
  • 1,213
  • 4
  • 20
  • 54
0
votes
1 answer

FlyWay configuration for several databases

I'm integrating FlyWay to the project. Besides of migrations for working database I would like to setup database with fixtures for integration tests during gitlab pipeline job(just for cases when somebody pushes the branch). On project is used…
Sam Fisher
  • 746
  • 2
  • 10
  • 27
0
votes
0 answers

Empty result when running DDL migration

I am working on adding (back) support for Apache Phoenix (at least for our own usage, looks like it was pulled a few years ago) on top of the latest version of Flyway. I wrote a real small script to create a table, and am running migrate. I see that…
nycjay
  • 51
  • 5
0
votes
0 answers

Flyway migration validation fails after running integration test

I have a problem with flyway migration validation when I am running integration tests on local. Whenever it fails, I delete flywaydb in .m2 folder and then I run maven install then run the test and everything is fine. But when I run test second time…
user1474111
  • 1,356
  • 3
  • 23
  • 47
0
votes
1 answer

Springboot @entity create table vs flyway create table

When we use Springboot (without flyway dependency) Once we define an object model and mark it with @Entity tag, and run the application Seems spring boot will automatically create a table in a database. But when we add flyway dependency, when we run…
hounan
  • 19
  • 5
0
votes
0 answers

Flyway windows command line gives no output, at all

I have been using flyway for a while and have managed to successfully execute migrations. This past week or so whenever I try and use flyway the command executes successfully but I get no output at all! This is not such a big issue for the migrate…
0
votes
0 answers

How to set the jdbc URL for H2 database?

When I try to do the flyway tutorial for Java, I wanted to check the flyway_schema_history table stored in the embedded H2 database. The database file (foobar.mv.db) is created at project target folder with the…
Cong
  • 11
  • 3
0
votes
1 answer

Do I need to use Hibernate annotations when using Flyway?

In my Spring Boot apps, I am using Hibernate and there are several annotations for index, constraint, unique_key, etc. On the other hand, I am also using Flyway for migration in order to create tables besides populating data in the database. In the…
Jack
  • 1
  • 21
  • 118
  • 236
0
votes
0 answers

How to give flyway commands to spring boot application like info migrate or info && migrate

I am trying to run my flyway application bundled with spring boot java -jar flyway-0.0.1-SNAPSHOT.jar --flyway.commands=info But this one is not working. Its not honoring flyway command My dependencies are dependencies { implementation…
Patan
  • 17,073
  • 36
  • 124
  • 198
0
votes
1 answer

Snowflake:Flyway:ERROR:Unable to determine Original Schema for the Connection

Requirement: To run flyway snowflake DB scripts in MacOS Installed brew install flyway Error: Below screenshot, works fine in Windows machine
Kar
  • 790
  • 13
  • 36
0
votes
1 answer

Flyway and QuestDB: unknown function name: EXISTS(CURSOR)

I am trying to run Flyway migrations scripts on QuestDB. When I run it I get the following error: ERROR: unknown function name: EXISTS(CURSOR) I see from the logs that it sends this query to QuestDB which obviously doesn't implement EXISTS(CURSOR)…
0
votes
0 answers

Running Docker Compose from maven doesn't return logs

I am trying to run docker compose using mvn clean install, but it doesn't return log. the problem is if I don't set the detachedMode = true, it shows the log of containers but it will remain in up state and the down goal doesn't run. On the other…
0
votes
1 answer

Can I set range (min/max) for a column when creating PostgreSQL table

I use the following table creation script in Flyway and wondering if it is possible to define a range or min/max value for a column. CREATE TABLE IF NOT EXISTS room ( // ... temperature NUMERIC NOT NULL, room_no VARCHAR(40) …
Einstein
  • 13
  • 5
0
votes
0 answers

Flyway DB Migration regex value

I have a problem, I need to have a DB-level checker with names and after running the application, the person should not be able to manually change the name to an invalid name. But the name of regex should be dynamic. INSERT INTO "subject"(id,…
Garik
  • 1
  • 1