SoftDeletableTable

A table mixin that adds soft-delete functionality. Provides a deletedAt column that is set when a record is "deleted" and cleared when the record is "restored".

Use this for tables where you want to retain data but hide deleted records from normal queries.

Example:

class UserTable(pluginId: String) : PluginTable(pluginId, "users"), SoftDeletableTable {
val id = integer("id").autoIncrement()
val name = varchar("name", 100)
// SoftDeletableTable provides: deletedAt
}

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val deletedAt: Column<Instant?>

The column storing the deletion timestamp.