Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

364 ticket, changed subgoal to benchmark #381

Merged
merged 11 commits into from
Nov 2, 2024
9 changes: 4 additions & 5 deletions src/backend/db/migrations/1_initial-migrations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ CREATE TABLE "goal" (
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

-- aka benchmark
CREATE TABLE "subgoal" (
subgoal_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), -- TODO: add index to allow reordering
CREATE TABLE "benchmark" (
benchmark_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), -- TODO: add index to allow reordering
goal_id UUID REFERENCES "goal" (goal_id),
status TEXT NOT NULL DEFAULT 'In Progress'
CHECK (status IN ('In Progress', 'Complete')),
Expand All @@ -100,7 +99,7 @@ CREATE TABLE "subgoal" (

CREATE TABLE "task" (
task_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
subgoal_id UUID REFERENCES "subgoal" (subgoal_id),
benchmark_id UUID REFERENCES "benchmark" (benchmark_id),
assignee_id UUID REFERENCES "user" (user_id),
due_date TIMESTAMPTZ,
trial_count INTEGER,
Expand Down Expand Up @@ -128,5 +127,5 @@ CREATE TABLE "trial_data_file" (
);

-- Potential schema for different collection types:
-- type TEXT NOT NULL CHECK (type IN ('attempt', 'behavioral')) -- enum - type of subgoal
-- type TEXT NOT NULL CHECK (type IN ('attempt', 'behavioral')) -- enum - type of benchmark
-- data jsonb -- actual data, e.g. attempt_counts etc
Loading
Loading