- 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.
11 lines
357 B
SQL
11 lines
357 B
SQL
ALTER TABLE user_profiles ADD COLUMN password_hash TEXT NOT NULL DEFAULT '';
|
|
|
|
CREATE TABLE sessions (
|
|
token UUID PRIMARY KEY,
|
|
user_id UUID NOT NULL REFERENCES user_profiles(user_id) ON DELETE CASCADE,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
expires_at TIMESTAMPTZ NOT NULL
|
|
);
|
|
|
|
CREATE INDEX sessions_user_id_idx ON sessions (user_id);
|