Skip to content

app.usage_rollups

TableRow level security on

Closed monthly usage totals per org and meter: the billing record reported to Stripe. Written once by the monthly rollup after the month ends and kept after the usage events age out (stored total registered in the denormalization register).

Primary key: id

Columns of app.usage_rollups
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org. A row never moves to another org.References app.organizations.id
meter_codetextNoMeter.References private.usage_meters.code
period_startdateNoFirst day of the month the total covers (UTC).
quantitybigintNoTotal usage in the month, summed from usage_events when the month closed.
closed_attimestamp with time zoneNoWhen the total was computed.
reported_attimestamp with time zoneYesWhen the total was reported to Stripe.
stripe_usage_record_idtextYesStripe usage record id returned on reporting.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.