pr_01m47d15m3e54sn21z27rpy5n9/services/billing/migrations/0007_pending_usage.sql
| 1 | -- Usage this month that is not on the ledger yet, such as app traffic |
| 2 | -- past the Deployments plan, which is charged when the month closes. It |
| 3 | -- counts toward the workspace's limit as it happens. Replaced on each |
| 4 | -- report; see `note_pending` in src/limits.rs. |
| 5 | CREATE TABLE pending_usage ( |
| 6 | workspace TEXT NOT NULL, |
| 7 | -- deployments. |
| 8 | source TEXT NOT NULL, |
| 9 | -- YYYY-MM. |
| 10 | month TEXT NOT NULL, |
| 11 | -- What it will be charged, in millionths of a dollar. |
| 12 | charge_micros INTEGER NOT NULL, |
| 13 | updated_at TEXT NOT NULL, |
| 14 | PRIMARY KEY (workspace, source, month) |
| 15 | ); |