feat: implement user profile management with avatars, login, and personal data
- Add avatar upload functionality with public URL access. - Implement user login with email and password authentication. - Create endpoints for fetching and updating the authenticated user's profile. - Set up database migrations for user profiles, including email and role management. - Introduce personal data management linked to user profiles. - Add email verification process with welcome email templates.
This commit is contained in:
7
profiles/migrations/5_add_email.up.sql
Normal file
7
profiles/migrations/5_add_email.up.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
ALTER TABLE user_profiles ADD COLUMN email TEXT NOT NULL DEFAULT '';
|
||||
|
||||
-- Existing rows predate the email column; give each a unique placeholder
|
||||
-- derived from its user ID so the uniqueness constraint below can apply.
|
||||
UPDATE user_profiles SET email = user_id || '@example.invalid' WHERE email = '';
|
||||
|
||||
CREATE UNIQUE INDEX user_profiles_email_idx ON user_profiles (email);
|
||||
Reference in New Issue
Block a user