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/0004_email_verification.sql

14 lines504 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.

Email verification, password reset, and Git for AI scale positioning1ALTER TABLE users ADD COLUMN email_verified_at INTEGER;
2
3-- Accounts that existed before verification was required.
4UPDATE users SET email_verified_at = unixepoch();
5
6-- One-time links sent by email. id is the SHA-256 of the token in the link.
7CREATE TABLE email_tokens (
8 id TEXT PRIMARY KEY,
9 user_id TEXT NOT NULL REFERENCES users (id) ON DELETE CASCADE,
10 -- 'verify' or 'reset'
11 kind TEXT NOT NULL,
12 expires_at INTEGER NOT NULL
13);
14CREATE INDEX email_tokens_user ON email_tokens (user_id, kind);