项目作者: viartemev

项目描述 :
Flyway migration feature for Ktor (Kotlin)
高级语言: Kotlin
项目地址: git://github.com/viartemev/ktor-flyway-feature.git
创建时间: 2019-07-24T08:24:30Z
项目社区:https://github.com/viartemev/ktor-flyway-feature

开源协议:MIT License

下载


Ktor flyway feature

CI

Ktor feature for version control for your database by Flyway.

Usage

Set up in Gradle:

groovy repositories { jcenter() } dependencies { implementation("com.viartemev:ktor-flyway-feature:$ktor_flyway_feature_version") }
Set up in Maven:

xml <repositories> <repository> <id>jcenter</id> <url>https://jcenter.bintray.com/</url> </repository> </repositories> <dependency> <groupId>com.viartemev</groupId> <artifactId>ktor-flyway-feature</artifactId> <version>${ktor_flyway_feature_version}</version> </dependency>

Add the feature to the code:

  1. install(FlywayFeature) {
  2. dataSource = database.connectionPool //required
  3. locations = arrayOf("custom/dir", "other/custom/dir") //optional, default value = arrayof("db/migration")
  4. commands(Info, Migrate) //optional, default command list is: Info, Migrate
  5. schemas = arrayOf("CUSTOM_SCHEMA_1", "CUSTOM_SCHEMA_2") // optional, default value is the DB product specific default schema
  6. }

Contributing

We welcome any contributions—reports of issues, ideas for enhancements, and pull requests related to either of those.