infoalloggi-monorepo/apps/db/migrations/30_user_semplification.up.sql
Marco Pedone 4d7802ccc6 feat: implement user invitation system with email invites and password setup
- Added user_invites table to manage invitation tokens.
- Created invite router with procedures for sending, verifying, and accepting invites.
- Implemented email sending functionality for invites.
- Updated user controller to handle password setting during invite acceptance.
- Introduced mustChangePassword flag in user schema and related logic.
- Added middleware to enforce password change requirement.
- Created forms for accepting invites and changing passwords.
- Updated database migrations to reflect new user invite structure and fields.
2025-12-14 18:57:56 +01:00

9 lines
No EOL
354 B
SQL

--- Removes verification columns from users table
ALTER TABLE public.users
DROP COLUMN IF EXISTS "isVerified",
DROP COLUMN IF EXISTS "verificationToken",
DROP COLUMN IF EXISTS "verificationTokenExpires";
--Add mustChangePassword column to users table
ALTER TABLE public.users
ADD COLUMN IF NOT EXISTS "mustChangePassword" BOOLEAN DEFAULT FALSE NOT NULL;