com.github.spt-oss:flyway-core

Custom implementation for Flyway

License

License

Categories

Categories

Flyway Data Databases
GroupId

GroupId

com.github.spt-oss
ArtifactId

ArtifactId

flyway-core
Last Version

Last Version

5.2.4.0
Release Date

Release Date

Type

Type

jar
Description

Description

Custom implementation for Flyway
Project Organization

Project Organization

SPT
Source Code Management

Source Code Management

https://github.com/spt-oss/flyway-plus/tree/master/flyway-core

Download flyway-core

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.spt-oss/flyway-core/ -->
<dependency>
    <groupId>com.github.spt-oss</groupId>
    <artifactId>flyway-core</artifactId>
    <version>5.2.4.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.spt-oss/flyway-core/
implementation 'com.github.spt-oss:flyway-core:5.2.4.0'
// https://jarcasting.com/artifacts/com.github.spt-oss/flyway-core/
implementation ("com.github.spt-oss:flyway-core:5.2.4.0")
'com.github.spt-oss:flyway-core:jar:5.2.4.0'
<dependency org="com.github.spt-oss" name="flyway-core" rev="5.2.4.0">
  <artifact name="flyway-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.spt-oss', module='flyway-core', version='5.2.4.0')
)
libraryDependencies += "com.github.spt-oss" % "flyway-core" % "5.2.4.0"
[com.github.spt-oss/flyway-core "5.2.4.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.flywaydb : flyway-core jar 5.2.4

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.4

test (3)

Group / Artifact Type Version
com.h2database : h2 jar 1.4.197
com.zaxxer : HikariCP jar 2.7.9
org.springframework.boot : spring-boot-starter-test jar 2.0.6.RELEASE

Project Modules

There are no modules declared in this project.

Flyway Plus

circleci maven central javadoc

  • Custom implementation for Flyway
  • Note: This project is unofficial and experimental.

Products

  • CustomFlyway extends Flyway
    • Additional method: setPlaceholderReplacer(PlaceholderReplacer)
  • MysqlH2SqlReplacer implements PlaceholderReplacer
    • Replace MySQL-SQL to H2-SQL on migration

Usage

  1. Add a dependency in your project.

    <dependency>
        <groupId>com.github.spt-oss</groupId>
        <artifactId>flyway-core</artifactId>
        <version>5.2.4.0</version>
    </dependency>
  2. Create a subclass of PlaceholderReplacer. You can also use MysqlH2SqlReplacer.

    package my.project;
    
    import org.flywaydb.core.internal.util.placeholder.PlaceholderReplacer;
    
    public class MyPlaceholderReplacer implements PlaceholderReplacer {
        ......
    }
  3. Setup CustomFlyway instance.

    import java.sql.DataSource;
    import org.flywaydb.core.CustomFlyway;
    import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
    import my.project.MyPlaceholderReplacer;
    
    DataSource dataSource = DataSourceBuilder.create().url("jdbc:mysql://host:3306/db").build();
    
    CustomFlyway flyway = new CustomFlyway();
    flyway.setLocations("classpath:/data");
    flyway.setSchemas("foo", "bar");
    flyway.setDataSource(dataSource);
    flyway.setPlaceholderReplacer(new MyPlaceholderReplacer());
    flyway.migrate();

License

  • This software is released under the Apache License 2.0.
com.github.spt-oss

SPT

Open Source Libraries for Java

Versions

Version
5.2.4.0
5.1.4.1