g1t/services/identity/migrations/0021_waitlist_notices.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.
| status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas | 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). | |
| 8 | ALTER TABLE waitlist ADD COLUMN acknowledged_at TEXT; | |
| 9 | -- When staff were told about the request. Null: not yet; the next summary | |
| 10 | -- includes it. | |
| 11 | ALTER TABLE waitlist ADD COLUMN notified_at TEXT; | |
| 12 | -- What staff wrote when approving, sent in the invite email. | |
| 13 | ALTER TABLE waitlist ADD COLUMN note TEXT; | |
| 14 | ||
| 15 | -- Requests from before this: staff already see them in sudo, so no summary | |
| 16 | -- repeats them. | |
| 17 | UPDATE waitlist SET notified_at = updated_at WHERE notified_at IS NULL; | |
| 18 | ||
| 19 | CREATE INDEX IF NOT EXISTS waitlist_status_created ON waitlist (status, created_at); | |
| 20 | CREATE INDEX IF NOT EXISTS waitlist_unnotified ON waitlist (notified_at) WHERE notified_at IS NULL; |