Change historical_data.date to a timestamp with timezone
Problem to solve
Currently we only record the date when recording the current active user count in ee/app/models/historical_data.rb.
The customers app receives this data (if seat link data is turned on) and uses it for charging customers. Since it doesn't contain a timestamp, we cannot know exactly when the data was collected.
Proposal
- Change the
historical_data.date
column from adate
data type to atimestamptz
data type. - We can set the
time
for existing data to12:00
in the RailsTime.zone
since that is when theHistoricalDataWorker
is set to run every day. - Update code that uses the
historical_data
table to handle timestamps.
We can also rename the column in a follow-up issue.
Documentation
Availability & Testing
What does success look like, and how can we measure that?
The historical_data
table contains the exact timestamp (with timezone) when the data was collected.
Is this a cross-stage feature?
Yes. May also affect Telemetry, in addition to Fulfillment.
Edited by Reuben Pereira