feat: expand admin and instructor tools
All checks were successful
CI / Validate frontend and API (push) Successful in 50s
CI / Build and publish Docker images (push) Successful in 20s

This commit is contained in:
Cauê Faleiros
2026-09-01 13:19:29 -03:00
parent caaf904281
commit 4736fb5208
13 changed files with 385 additions and 22 deletions

View File

@@ -0,0 +1,15 @@
create type account_token_purpose as enum ('invitation', 'password_reset');
create table account_access_tokens (
id uuid primary key default gen_random_uuid(),
email text not null,
role user_role not null default 'student',
purpose account_token_purpose not null,
token_hash text not null unique,
expires_at timestamptz not null,
used_at timestamptz,
created_by uuid not null references users(id),
created_at timestamptz not null default now()
);
create index account_access_tokens_lookup_index on account_access_tokens (token_hash) where used_at is null;