from data import Registry, RowModel, Table from data.columns import String, Timestamp, Integer, Bool class VersionHistory(RowModel): """ CREATE TABLE version_history( component TEXT NOT NULL, from_version INTEGER NOT NULL, to_version INTEGER NOT NULL, author TEXT NOT NULL, _timestamp TIMESTAMPTZ NOT NULL DEFAULT NOW(), ); """ _tablename_ = 'version_history' _cache_ = {} component = String() from_version = Integer() to_version = Integer() author = String() _timestamp = Timestamp() class BotData(Registry): version_history = VersionHistory.table