Flyway

Custom implementation of Flyway

Лицензия

Лицензия

Категории

Категории

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

Группа

com.github.bitmc
Идентификатор

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

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

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

7.4.0.0
Дата

Дата

Тип

Тип

pom
Описание

Описание

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

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

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

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

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

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

https://github.com/bitmc/flyway

Скачать flyway-parent

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

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

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

Зависимости

provided (1)

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

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

  • flyway-core

Flyway

github actions maven central javadoc

  • Custom implementation of Flyway

Usage

  1. Add a dependency in your project.

    <dependency>
        <groupId>com.github.bitmc</groupId>
        <artifactId>flyway-core</artifactId>
        <version>7.4.0.0</version>
    </dependency>
  2. Implement SqlReplacer. You can also use MysqlH2SqlReplacer.

    package my.project;
    
    import org.flywaydb.core.internal.sqlscript.SqlReplacer;
    
    public class MySqlReplacer implements SqlReplacer {
        
        public String replace(String sql) {
            ......
        }
    }
  3. Setup CustomFlyway instance.

    import org.flywaydb.core.CustomFlyway;
    import org.flywaydb.core.Flyway;
    import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
    import my.project.MySqlReplacer;
    
    Flyway source = Flyway.configure()
        .locations("classpath:/data/migration")
        .schemas("example")
        .sqlMigrationPrefix("")
        .sqlMigrationSeparator("-")
        .dataSource(DataSourceBuilder.create().url("jdbc:h2:mem:test;MODE=MySQL;DATABASE_TO_UPPER=FALSE").build())
        .load();
    
    CustomFlyway flyway = new CustomFlyway(source, new MySqlReplacer());
    flyway.clean();
    flyway.migrate();

License

  • Apache License 2.0
com.github.bitmc

BITMC

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

Версия
7.4.0.0
7.3.2.0
7.2.1.0
7.1.1.1
7.1.1.0