Package-level declarations

Example KQLite Database Migration

// Create specific migration class, example upgrade version 2 to 3
class Migration23 : KQLiteMigration(2, 3) {
// Migrations executes in EXCLUSIVE transaction by default
override fun migrate(database: KQLiteDatabase) {
val schema = database.schema()
schema.alterTable(TblPeople).addColumn(TblPeople.nationality)
}
}
// Below override inside KQLiteDatabase class
override fun getKQLiteMigrations(): List<KQLiteMigration>? {
return listOf(
Migration23()
)
}

Types

Link copied to clipboard
interface AlterTable

Provides a set of functions to perform ALTER TABLE operations on a database table.

Link copied to clipboard
abstract class KQLiteMigration(val fromVersion: Int, val toVersion: Int)

Represents a migration path for a KQLiteDatabase. Migration happens in EXCLUSIVE transaction.

Link copied to clipboard
interface KQLiteSchema