-- +goose Up -- Like users, these rows belong to a person rather than an organization and -- are not under row-level security. CREATE TABLE recovery_codes ( user_id uuid NOT NULL REFERENCES users (id) ON DELETE CASCADE, code_hash bytea NOT NULL, used_at timestamptz, created_at timestamptz NOT NULL DEFAULT now(), PRIMARY KEY (user_id, code_hash) ); -- +goose Down DROP TABLE recovery_codes;