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

Merging Flyway versions that is already migrated in two environments

We have two different envirionments Dev (develop git branch) Production (release/1.0 git branch) release/1.0 release was the first release and a developer has changed the old Flyway files in the release/1.0. So, following are the changes in…
s1n7ax
  • 2,750
  • 6
  • 24
  • 53
0
votes
0 answers

Docker Gitlab Runner Running Flyway Unable to Obtain Connection with AWS Postgres RDS

The Problem: I am unable to connect to a Postgres RDS from a Gitlab runner via Flyway. The Error: ERROR: Unable to obtain connection from database (jdbc:postgresql://datacatalog-rds-stage.redacted.us-west-2.rds.amazonaws.com:5432/datacatalog ) for…
user6866797
  • 135
  • 2
  • 17
0
votes
2 answers

Can flyway be used for production support (DML) kind of scripts?

I understand using flyway for database versioning and using to create a database which matching my development efforts. However, there are often times when scripts need to be run on production databases for maintenance, fix problems, or change data,…
Michael Remijan
  • 687
  • 7
  • 22
0
votes
0 answers

How to execute flyway where in scripts & flyway services are stored in different repositories?

Since we have many applications & services that are going to leverage flyway, I have created 2 separate project repositories: - migration-service, To store migration scripts. - flyway-service, to execute the scripts. The Problem: All teams are…
mayank bisht
  • 618
  • 3
  • 14
  • 43
0
votes
2 answers

can we add custom validation with flyway community edition?

can we add custom validation with the flyway community edition? basically, we wanted to add some (file checks through extensions like ".SQL" to ignore and ".sql" to accept)?
Vicky
  • 51
  • 6
0
votes
1 answer

Flyway doesn't find migrations prefixed with timestamp

I am using Kotlin with spring and, FlywayPlugin 9.3 and Flyway-core without specifying the version to run the migrations. The configuration file is like this: flyway { url = "url" user = "user" password = "password" locations =…
0
votes
0 answers

Flyway maven plugin: Error, no migration could be resolved in the configured locations

I am using flyway latest version, 9.3.0, to create tables in a postgres database which has many different schemas. However, my problem is related to locations parameter. I am using external cofiguration where i specify locations…
0
votes
1 answer

Postgres Insert Trigger or update with Java?

I am learning how to use ORM with Postgres in Java and I want to maintain in the table column date record that will hold exactly the following format: 2022-05-28T21:12:01.000Z So I see two path: Create a Postgres Insert trigger Just care about date…
floatfoo
  • 83
  • 2
  • 8
0
votes
0 answers

H2 SQL Server Compatability Mode - "GO" Triggers syntax error

I am trying to convert the database in our developer desktop environment from a containerized SQL Server to h2 to make our tests run faster. I have configured the h2 database to run in sql server compatibility mode. Spring…
0
votes
0 answers

Flyway logs and schema_history_table show a repeatable migration was installed, but the database is not updated

We are using a dockerized version of Flyway Community Edition 5.2.4 to manage db changes in a production environment. The database in question only has 2 versioned migrations and 3 repeatable migrations. Our most recent release included the…
0
votes
0 answers

Flyway Baseline existing SQL Server schema leaves Installed_by column in migration_history table NULL

When I baseline an existing SQL Server schema everything works fine except the installed_by column in the migration_history table is set to null. Performing subsequent migrations populates the installed_by as expected. Url is identical between the…
Jim
  • 692
  • 7
  • 15
0
votes
1 answer

Table not found in integration tests when using TestContainers with Flyway

I am trying to connect to Postgres database instance of TestContainers but I get the error org.postgresql.util.PSQLException: ERROR: relation "proposal" does not exist in Spring data repository class "ProposalRepository" when running the…
firstpostcommenter
  • 2,328
  • 4
  • 30
  • 59
0
votes
1 answer

How to secure sensitive information in flyway sql files?

I use Flyway with Spring boot to version control my DB, all well and good. The issue is the SQL files will be stored in my source code under resources/db/migration/.., and it's hosted on Github, so if someone could get my source code somehow from…
Soufiane Odf
  • 1,054
  • 2
  • 9
  • 23
0
votes
0 answers

IntelliJ run spring boot JPA application says not-null property references a null or transient value , But working fine from terminal

I have a microservice project using Spring Boot: 2.6.2, JPA, and H2 DB with JAVA 17. when I run my project from IntelliJ as an application from configuration it shows the below exception while inserting data into DB: Caused by:…
MANITORATION
  • 557
  • 2
  • 5
  • 19
0
votes
1 answer

Flyway test a migration without committing it

I have a simple question (request?) which I have looked all over and really cannot find an answer to. As part of my routine workflow I will want to be able to test a migration on a staging server without committing it. That means running the…
Alexi Theodore
  • 1,177
  • 10
  • 16
1 2 3
99
100