- 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.
9 lines
No EOL
354 B
SQL
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; |