sqldelight-runtime / com.squareup.sqldelight.db / SqlDriver / Schema

Schema

interface Schema

API for creating and migrating a SQL database.

Properties

version

abstract val version: Int

The version of this schema.

Functions

create

abstract fun create(driver: SqlDriver): Unit

Use driver to create the schema from scratch. Assumes no existing database state.

migrate

abstract fun migrate(driver: SqlDriver, oldVersion: Int, newVersion: Int): Unit

Use driver to migrate from schema oldVersion to newVersion.