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/identity/migrations/0021_waitlist_notices.sql

20 lines1,037 bytesCodeBlame
1-- 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;