micro_utils.dokka
0.15.1

# setTableVersion

open suspend override fun setTableVersion(tableName: String, version: Int, onCreate: suspend T.() -> Unit, onUpdate: suspend T.(from: Int, to: Int) -> Unit)

By default, instance of this interface will check that version of table with name tableName is less than version or is absent

In case if tableName didn't found, will be called onCreate. Then in case if tableName have version less than parameter version or null, it will increase version one-by-one until database version will be equal to version

#### Parameters

version

Current version of table

onCreate

This callback will be called in case when repo have no information about table

onUpdate

This callback will be called after iterative changing of version. It is expected that parameter "to" will always be greater than "from"