Infendro 7909e4e4de update README
add relevant imports to Usage
2025-10-02 11:31:29 +02:00
2025-08-31 10:48:29 +02:00
2025-08-31 10:48:29 +02:00
2025-08-31 10:48:29 +02:00
2025-10-02 11:07:14 +02:00
2025-08-31 10:48:29 +02:00
2025-08-31 10:48:29 +02:00
2025-08-31 10:48:29 +02:00
2025-10-02 11:31:29 +02:00
2025-08-31 10:48:29 +02:00

Kotlin Database Migration

This library enables code-based database migrations in Kotlin.

Installation

Add the following to your build.gradle.kts.

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

dependencies {
    implementation("com.infendro:migration:1.1.0")
}

Usage

import com.infendro.migration.migrate
import org.jetbrains.exposed.sql.Database

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

    // declare and execute migrations
    migrate {
        // create a migration
        migration("initial") {
            // execute code to migrate the database
        }
    }
}

How It Works

  • Each migration is identified by a unique name.
  • Migrations are executed in the order they are declared in.
  • Executed migrations are tracked in a database table and skipped on subsequent runs.
Description
No description provided
Readme 120 KiB
Languages
Kotlin 100%