flagon-io/g1t

public

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t/services/billing/migrations/0010_month_close.sql

16 lines569 bytesCodeBlame
1-- Closing each month: what a workspace with a card on file owed when the
2-- month ended, charged to that card. Once per workspace per month. See
3-- `close_months` in src/limits.rs.
4CREATE TABLE month_closes (
5 workspace TEXT NOT NULL,
6 -- YYYY-MM, the month that closed.
7 month TEXT NOT NULL,
8 -- paid, failed, nothing (owed nothing) or skipped (comped, or on an
9 -- enterprise, which is invoiced).
10 status TEXT NOT NULL,
11 amount_micros INTEGER NOT NULL DEFAULT 0,
12 payment_id TEXT,
13 error TEXT,
14 closed_at TEXT NOT NULL,
15 PRIMARY KEY (workspace, month)
16);