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