Add hotel registration with email confirmation (nodemailer, confirm-email endpoint)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 17:30:07 +03:00
parent c06f4bf553
commit 152a8c0463
6 changed files with 259 additions and 5 deletions

View File

@@ -0,0 +1,7 @@
ALTER TABLE users
ADD COLUMN IF NOT EXISTS email_confirmed BOOLEAN NOT NULL DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS confirmation_token VARCHAR(255),
ADD COLUMN IF NOT EXISTS confirmation_sent_at TIMESTAMPTZ;
-- Existing users (seed data) are already confirmed
UPDATE users SET email_confirmed = TRUE WHERE confirmation_token IS NULL;