pto.0.2.0.source-code.DatabaseMigrator.kt Maven / Gradle / Ivy
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
)
"""
)
)
}