storj/satellite/satellitedb/dbx/accounting.dbx

22 lines
602 B
Plaintext
Raw Normal View History

// accounting_timestamps saves the last time an process completed.
model accounting_timestamps (
key name
// name is one of "LastAtRestTally", "LastBandwidthTally" or "LastRollup".
// See the details in satellite/accounting/common.go for their meaning.
field name text
// value is the last time that the specific event completed.
field value timestamp ( updatable )
)
create accounting_timestamps ( noreturn, replace )
update accounting_timestamps (
where accounting_timestamps.name = ?
noreturn
)
read scalar (
select accounting_timestamps.value
where accounting_timestamps.name = ?
)