Flyway

How do I best work around Flyway issue 156?

ⅰ亾dé卋堺 提交于 2019-12-20 03:32:15
问题 I'm trying to get Flyway configured and have run up against issue 156, where I can't escape the following message: [WARNING] Unable to find path for sql migrations: db/migration The folder exists, contains an sql script named V1__baseline.sql and is relative to the path of both the pom.xml and the current working directory when invoking mvn flyway:migrate . The relevant section of my pom.xml looks like this: <plugin> <groupId>com.googlecode.flyway</groupId> <artifactId>flyway-maven-plugin<

Flyway - managing multiple schemas doesn't work

情到浓时终转凉″ 提交于 2019-12-20 03:15:41
问题 I'm trying to do a migrate on a number of different Postgresql schemas that have the same lifecycle. According to the flyway documentation such a scenario should work. I have the following in my ANT script: When I run the migration, the changes are only applied to the first (default) schema. Am I doing something wrong, or does the flyway.schemas property only work for clean? Thank you 回答1: When dealing with multiple schemas, you still have to prefix the object names accordingly. Only the

How do I configure Flyway in Grails3 / Postgres?

怎甘沉沦 提交于 2019-12-20 03:13:46
问题 I am trying to use Flyway to run migrations for my Grails 3.2.8 application. According to https://flywaydb.org/documentation/plugins/grails one should just need to add a dependency to build.gradle: dependencies { compile "org.flywaydb:flyway-core:4.1.2" } As I want Flyway to generate my schema I have also edited application.yml to not have domain object generated. If I do not have this setting Grails will generate my tables - not Flyway. environments: development: dataSource: dbCreate: none I

Flyway Info screen State is Future, not Missing

☆樱花仙子☆ 提交于 2019-12-19 07:48:41
问题 Due to a few company-specific features, which I need to swap in and out, I sometimes have migrated scripts which are not present in the sql directory when I run "info" or "migrate" at a later time. I just noticed an inconsistency, though, in how this displays: +----------------+----------------------------+---------------------+---------+ | Version | Description | Installed on | State | +----------------+----------------------------+---------------------+---------+ ... | 4.1 | Add new reports

Flyway database migration to multiple schemas

淺唱寂寞╮ 提交于 2019-12-19 07:10:15
问题 I've set up a migration script for my multi-tenant application. the problem was. it's only generating the scripts for the first tenant/schema I've specified on the parameter. Here's my sql script drop table if exists ADMIN_ACCOUNT cascade; drop table if exists PERSON_NAME cascade; drop table if exists USER_ACCOUNT cascade; create table ADMIN_ACCOUNT ( id int8 not null, created_date timestamp, PASSWORD varchar(255), USERNAME varchar(255), membershipType varchar(255), NAME_ID int8, primary key

Multiple datasources migrations using Flyway in a Spring Boot application

China☆狼群 提交于 2019-12-18 12:55:13
问题 We use Flyway for db migration in our Spring Boot based app and now we have a requirement to introduce multi tenancy support while using multiple datasources strategy. As part of that we also need to support migration of multiple data sources. All data sources should maintain the same structure so same migration scripts should be used for migrating of all data sources. Also, migrations should occur upon application startup (as opposed to build time, whereas it seems that the maven plugin can

Flyway multiple metadata tables in one schema

心已入冬 提交于 2019-12-18 04:48:14
问题 I'm trying to use Flyway to version the database of a modular application. Each module has its own separate set of tables, and migration scripts that will control the versioning of that set of tables. Flyway allows me to specify a different metadata table for each module - this way I can version each module independently. When I try to upgrade the application, I run a migration process for each module, each with its own table and set of scripts. Note that these tables are all in the same

Best way for “database specific” sql scripts with Flyway

只谈情不闲聊 提交于 2019-12-18 03:49:15
问题 I started to use Flyway in my current project for database migrations and I like it very much. I currently use Oracle in PROD- and Derby in TEST-Environment. Pretty soon, I did run in the problem of database specific sql commands, e.g. ALTER TABLE T1 MODIFY F1 VARCHAR(256); on Oracle vs ALTER TABLE T1 ALTER F1 SET DATA TYPE VARCHAR(256); on Derby. I can't see a way to write a "vendor neutral alter table modify column datatype" sql. What's the best way to deal with this problem using Flyway?

Any way to “compress” Flyway migrations?

眉间皱痕 提交于 2019-12-18 03:05:08
问题 We are using Flyway to migrate the database schema and we already have more than 100 migration scripts. Once we "squashed" multiple migrations into a single first-version migration, this is ok during development, as we drop and recreate the schema. But in production this wouldn't work, as Flyway won't be able to validate the migrations. I couldn't find any documentation or best practice of what to do in this case. The problem is that the file quantity increases constantly, I don't want to see

Schema related problems with Flyway / Spring and H2 embedded database

六眼飞鱼酱① 提交于 2019-12-18 02:49:57
问题 I am building a Spring 3 MVC app that uses a MySQL database and have recently integrated Flyway into the solution to manage the database migrations. I have successfully configured my applicationContext.xml according to the Flyway documentation such that, upon application startup, Flyway will migrate to the latest version. I am having trouble getting Flyway to play nicely with my unit / functional tests. I am using Spring Data JPA for my data access layer and have built some JUnit tests to