All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pto.0.1.0.source-code.DatabaseMigrator.kt Maven / Gradle / Ivy

There is a newer version: 0.3.1
Show newest version
package se.wollan.crypto

import se.wollan.datascope.SqliteDatabase
import se.wollan.datascope.migrate

interface DatabaseMigrator {
    suspend fun migrate()
}

internal class SqliteDatabaseMigrator(private val db: SqliteDatabase) : DatabaseMigrator {

    override suspend fun migrate() = db.migrate(
        schema = "crypto",
        sql = listOf(
            """
                CREATE TABLE crypto_key_value (
                    key TEXT PRIMARY KEY NOT NULL,
                    value
                )
            """
        )
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy