g1t/services/billing/migrations/0004_sandbox_time.sql
| 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); |