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)
- Host: GitHub
- URL: https://github.com/viartemev/ktor-flyway-feature
- Owner: viartemev
- License: mit
- Created: 2019-07-24T08:24:30.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-20T17:24:36.000Z (over 3 years ago)
- Last Synced: 2025-02-28T02:23:14.198Z (over 1 year ago)
- Topics: database, database-migration, flyway, kotlin, ktor, ktor-framework
- Language: Kotlin
- Homepage:
- Size: 316 KB
- Stars: 29
- Watchers: 4
- Forks: 5
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ktor flyway feature

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.