TimestampTable

A table mixin that automatically manages createdAt and updatedAt timestamps. These columns are automatically set when records are inserted or updated.

Use this for tables where you want to track when records were created/modified.

Example:

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

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val createdAt: Column<Instant>

The column storing when the record was created. This is set automatically on insert.

Link copied to clipboard
abstract val updatedAt: Column<Instant>

The column storing when the record was last updated. This is automatically updated on insert and update.