Package-level declarations

// Create specific migration class, example upgrade version 1 to 2
class Migration12 : KQLiteMigration(fromVersion = 1, toVersion = 2) {

override fun migrate(database: KQLiteDatabase) {
val schema = database.schema()

schema
.alterTable(TblContact)
.addColumn(TblContact.lastModified)
}
}

// Below override inside KQLiteDatabase class
override fun getKQLiteMigrations(): List<KQLiteMigration>? {
return listOf(
Migration12()
)
}

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