CREATE TABLE account_action_tokens (
 token VARCHAR(64) PRIMARY KEY,
 user_id BIGINT NOT NULL,
 action VARCHAR(32) NOT NULL,
 payload TEXT,
 expires_at VARCHAR(64) NOT NULL,
 used_at VARCHAR(64),
 created_at VARCHAR(64) NOT NULL,
 CONSTRAINT fk_account_action_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);
CREATE INDEX idx_account_action_user ON account_action_tokens(user_id);
