Flyway Plus

Custom implementation for Flyway

Лицензия

Лицензия

Категории

Категории

Flyway Данные Базы данных
Группа

Группа

com.github.spt-oss
Идентификатор

Идентификатор

flyway-parent
Последняя версия

Последняя версия

5.2.4.0
Дата

Дата

Тип

Тип

pom
Описание

Описание

Flyway Plus
Custom implementation for Flyway
Ссылка на сайт

Ссылка на сайт

https://github.com/spt-oss/flyway-plus
Организация-разработчик

Организация-разработчик

SPT
Система контроля версий

Система контроля версий

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

Скачать flyway-parent

Имя Файла Размер
flyway-parent-5.2.4.0.pom 1 KB
Обзор

Как подключить последнюю версию

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

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
org.projectlombok : lombok jar 1.18.4

Модули Проекта

  • flyway-core

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

Версии библиотеки

Версия
5.2.4.0
5.1.4.1