An open API service indexing awesome lists of open source software.

https://github.com/viartemev/ktor-flyway-feature

Flyway migration feature for Ktor (Kotlin)
https://github.com/viartemev/ktor-flyway-feature

database database-migration flyway kotlin ktor ktor-framework

Last synced: over 1 year ago
JSON representation

Flyway migration feature for Ktor (Kotlin)

Awesome Lists containing this project

README

          

# Ktor flyway feature
![CI](https://github.com/viartemev/ktor-flyway-feature/workflows/CI/badge.svg?branch=master)

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


jcenter
https://jcenter.bintray.com/

com.viartemev
ktor-flyway-feature
${ktor_flyway_feature_version}

```

Add the feature to the code:
```kotlin
install(FlywayFeature) {
dataSource = database.connectionPool //required
locations = arrayOf("custom/dir", "other/custom/dir") //optional, default value = arrayof("db/migration")
commands(Info, Migrate) //optional, default command list is: Info, Migrate
schemas = arrayOf("CUSTOM_SCHEMA_1", "CUSTOM_SCHEMA_2") // optional, default value is the DB product specific default schema
}
```
## Contributing
We welcome any contributions—reports of issues, ideas for enhancements, and pull requests related to either of those.