- Drop .gitmodules (ia_dev tracked as submodule pointer without file) - Add services/docv Cargo workspace: docv-back, docv-shared, migrations, sources - Refresh systemd/README.md
11 lines
513 B
SQL
11 lines
513 B
SQL
-- Rôles par office : requis lorsque office_members référence roles (role_uid IMPL / extensions).
|
|
-- Si la table existe déjà avec un autre schéma, cette commande ne fait rien (IF NOT EXISTS).
|
|
CREATE TABLE IF NOT EXISTS roles (
|
|
uid UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
office_uid UUID REFERENCES offices(uid) ON DELETE CASCADE,
|
|
name TEXT NOT NULL DEFAULT 'Member',
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_roles_office_uid ON roles(office_uid);
|