blob: 1636110df9156c1d7b74d5060074f9f1e1453d22 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
CREATE TABLE directive_goal_history (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
directive_id UUID NOT NULL REFERENCES directives(id) ON DELETE CASCADE,
goal TEXT NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX idx_directive_goal_history_directive_id ON directive_goal_history(directive_id);
CREATE INDEX idx_directive_goal_history_created_at ON directive_goal_history(directive_id, created_at DESC);
|