Files
migration.ktor/README.md
2026-04-16 16:17:12 +00:00

649 B

migration.ktor

migration.ktor is a Kotlin library that enables code-based migrations in Ktor.

Installation

Add the following to your build.gradle.kts.

repositories {
    maven("https://git.infendro.com/api/packages/Infendro/maven")
}

dependencies {
    implementation("com.infendro:ktor-migration:1.2.0")
}

Usage

fun Application.configureDatabase() {
    // connect to a database
    Database.connect(/* parameters */)

    // install the plugin
    install(Migration) {
        // create a migration
        migration("initial") {
            // execute code to migrate the database
        }
    }
}