g1t/services/identity/migrations/0021_waitlist_notices.sql

20 lines1,037 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.

status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas1-- Telling people about the waitlist: the person who asked gets one
2-- confirmation, staff get a summary of new requests at most every 15
3-- minutes, and an approval can carry a note into the invite email. Every
4-- timestamp is RFC 3339 UTC. See src/invites.rs.
5
6-- When the confirmation went to the address. Null: not sent (requests from
7-- before this migration, or sending failed).
8ALTER TABLE waitlist ADD COLUMN acknowledged_at TEXT;
9-- When staff were told about the request. Null: not yet; the next summary
10-- includes it.
11ALTER TABLE waitlist ADD COLUMN notified_at TEXT;
12-- What staff wrote when approving, sent in the invite email.
13ALTER TABLE waitlist ADD COLUMN note TEXT;
14
15-- Requests from before this: staff already see them in sudo, so no summary
16-- repeats them.
17UPDATE waitlist SET notified_at = updated_at WHERE notified_at IS NULL;
18
19CREATE INDEX IF NOT EXISTS waitlist_status_created ON waitlist (status, created_at);
20CREATE INDEX IF NOT EXISTS waitlist_unnotified ON waitlist (notified_at) WHERE notified_at IS NULL;