g1t/services/billing/migrations/0004_sandbox_time.sql
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.
| Every sandbox is metered by the second | 1 | -- Sandbox time each workspace used, by calendar month (UTC), so that the |
| 2 | -- free minutes are counted before any second is charged. | |
| 3 | CREATE TABLE sandbox_months ( | |
| 4 | workspace TEXT NOT NULL, | |
| 5 | -- YYYY-MM. | |
| 6 | month TEXT NOT NULL, | |
| 7 | seconds INTEGER NOT NULL DEFAULT 0, | |
| 8 | PRIMARY KEY (workspace, month) | |
| 9 | ); | |
| 10 | ||
| 11 | CREATE INDEX IF NOT EXISTS ledger_by_reference ON ledger (reference); |