Files
Assistant/database/migrations/003_situation_focus_bindings.sql
T
2026-08-16 15:22:49 +03:00

16 lines
397 B
PL/PgSQL

BEGIN;
SET ROLE situation_role;
CREATE TABLE IF NOT EXISTS situation.focus_bindings (
focus_binding_id TEXT PRIMARY KEY,
actor_id TEXT NOT NULL,
session_id TEXT NOT NULL,
workspace_id TEXT NOT NULL,
project_id TEXT NOT NULL,
goal_id TEXT NOT NULL,
scope_id TEXT NOT NULL,
active BOOLEAN NOT NULL,
recorded_at TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
);
RESET ROLE;
COMMIT;