g1t/services/billing/migrations/0023_one_operation_mapping.sql

6 lines396 bytesCodeBlame

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

One operation mapping, owned by repos; billing reads it instead of keeping its own1-- One mapping from Artifacts' raw meters to operations: the repos service's
2-- operation_mapping (set_operation_mapping), which says for each raw meter
3-- how many operations it is to Cloudflare and to the customer. Billing
4-- reads it with the raw counts (artifacts_usage) and keeps none of its own,
5-- so the table 0022 made for that, never written, goes.
6DROP TABLE IF EXISTS billable_units;