Schema: goals
Part of the generated database reference.
okr_activity_log
- Domain:
goals Β· Feature gate: #[cfg(feature = "goals")] Β· Migration: 6.5.23-branch-scope-cleanup
- Rust source:
botschema/src/goals.rs
| Column |
SQL type |
Null |
Default |
Key |
References |
| id |
UUID |
no |
gen_random_uuid() |
PK |
β |
| org_id |
UUID |
no |
β |
FK |
organizations.org_id |
| bot_id |
UUID |
no |
β |
β |
β |
| objective_id |
UUID |
yes |
β |
FK |
okr_objectives.id |
| key_result_id |
UUID |
yes |
β |
FK |
okr_key_results.id |
| user_id |
UUID |
no |
β |
β |
β |
| activity_type |
VARCHAR(255) |
no |
β |
β |
β |
| description |
TEXT |
yes |
β |
β |
β |
| old_value |
TEXT |
yes |
β |
β |
β |
| new_value |
TEXT |
yes |
β |
β |
β |
| metadata |
JSONB |
no |
'{}' |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |
okr_alignments
- Domain:
goals Β· Feature gate: #[cfg(feature = "goals")] Β· Migration: 6.5.23-branch-scope-cleanup
- Rust source:
botschema/src/goals.rs
| Column |
SQL type |
Null |
Default |
Key |
References |
| id |
UUID |
no |
gen_random_uuid() |
PK |
β |
| org_id |
UUID |
no |
β |
FK |
organizations.org_id |
| bot_id |
UUID |
no |
β |
β |
β |
| child_objective_id |
UUID |
no |
β |
FK |
okr_objectives.id |
| parent_objective_id |
UUID |
no |
β |
FK |
okr_objectives.id |
| alignment_type |
VARCHAR(255) |
no |
'supports' |
β |
β |
| weight |
NUMERIC |
no |
1.0 |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |
okr_checkins
- Domain:
goals Β· Feature gate: #[cfg(feature = "goals")] Β· Migration: 6.5.23-branch-scope-cleanup
- Rust source:
botschema/src/goals.rs
| Column |
SQL type |
Null |
Default |
Key |
References |
| id |
UUID |
no |
gen_random_uuid() |
PK |
β |
| org_id |
UUID |
no |
β |
FK |
organizations.org_id |
| bot_id |
UUID |
no |
β |
β |
β |
| key_result_id |
UUID |
no |
β |
FK |
okr_key_results.id |
| user_id |
UUID |
no |
β |
β |
β |
| previous_value |
NUMERIC |
yes |
β |
β |
β |
| new_value |
NUMERIC |
no |
β |
β |
β |
| note |
TEXT |
yes |
β |
β |
β |
| confidence |
VARCHAR(255) |
yes |
β |
β |
β |
| blockers |
TEXT |
yes |
β |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |
- Domain:
goals Β· Feature gate: #[cfg(feature = "goals")] Β· Migration: 6.5.23-branch-scope-cleanup
- Rust source:
botschema/src/goals.rs
| Column |
SQL type |
Null |
Default |
Key |
References |
| id |
UUID |
no |
gen_random_uuid() |
PK |
β |
| org_id |
UUID |
no |
β |
FK |
organizations.org_id |
| bot_id |
UUID |
no |
β |
β |
β |
| objective_id |
UUID |
yes |
β |
FK |
okr_objectives.id |
| key_result_id |
UUID |
yes |
β |
FK |
okr_key_results.id |
| user_id |
UUID |
no |
β |
β |
β |
| content |
TEXT |
no |
β |
β |
β |
| parent_comment_id |
UUID |
yes |
β |
FK |
okr_comments.id |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| updated_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |
okr_key_results
- Domain:
goals Β· Feature gate: #[cfg(feature = "goals")] Β· Migration: 6.5.23-branch-scope-cleanup
- Rust source:
botschema/src/goals.rs
| Column |
SQL type |
Null |
Default |
Key |
References |
| id |
UUID |
no |
gen_random_uuid() |
PK |
β |
| org_id |
UUID |
no |
β |
FK |
organizations.org_id |
| bot_id |
UUID |
no |
β |
β |
β |
| objective_id |
UUID |
no |
β |
FK |
okr_objectives.id |
| owner_id |
UUID |
no |
β |
β |
β |
| title |
VARCHAR(255) |
no |
β |
β |
β |
| description |
TEXT |
yes |
β |
β |
β |
| metric_type |
VARCHAR(255) |
no |
β |
β |
β |
| start_value |
NUMERIC |
no |
0 |
β |
β |
| target_value |
NUMERIC |
no |
β |
β |
β |
| current_value |
NUMERIC |
no |
0 |
β |
β |
| unit |
VARCHAR(255) |
yes |
β |
β |
β |
| weight |
NUMERIC |
no |
1.0 |
β |
β |
| status |
VARCHAR(255) |
no |
'not_started' |
β |
β |
| due_date |
VARCHAR(255) |
yes |
β |
β |
β |
| scoring_type |
VARCHAR(255) |
no |
'linear' |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| updated_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |
okr_objectives
- Domain:
goals Β· Feature gate: #[cfg(feature = "goals")] Β· Migration: 6.5.23-branch-scope-cleanup
- Rust source:
botschema/src/goals.rs
| Column |
SQL type |
Null |
Default |
Key |
References |
| id |
UUID |
no |
gen_random_uuid() |
PK |
β |
| org_id |
UUID |
no |
β |
FK |
organizations.org_id |
| bot_id |
UUID |
no |
β |
β |
β |
| owner_id |
UUID |
no |
β |
β |
β |
| parent_id |
UUID |
yes |
β |
FK |
okr_objectives.id |
| title |
VARCHAR(255) |
no |
β |
β |
β |
| description |
TEXT |
yes |
β |
β |
β |
| period |
VARCHAR(255) |
no |
β |
β |
β |
| period_start |
VARCHAR(255) |
yes |
β |
β |
β |
| period_end |
VARCHAR(255) |
yes |
β |
β |
β |
| status |
VARCHAR(255) |
no |
'draft' |
β |
β |
| progress |
NUMERIC |
no |
0 |
β |
β |
| visibility |
VARCHAR(255) |
no |
'team' |
β |
β |
| weight |
NUMERIC |
no |
1.0 |
β |
β |
| tags |
VARCHAR(255) |
no |
'{}' |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| updated_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |
okr_templates
- Domain:
goals Β· Feature gate: #[cfg(feature = "goals")] Β· Migration: 6.5.23-branch-scope-cleanup
- Rust source:
botschema/src/goals.rs
| Column |
SQL type |
Null |
Default |
Key |
References |
| id |
UUID |
no |
gen_random_uuid() |
PK |
β |
| org_id |
UUID |
no |
β |
FK |
organizations.org_id |
| bot_id |
UUID |
no |
β |
β |
β |
| name |
VARCHAR(255) |
no |
β |
β |
β |
| description |
TEXT |
yes |
β |
β |
β |
| category |
VARCHAR(255) |
yes |
β |
β |
β |
| objective_template |
JSONB |
no |
'{}' |
β |
β |
| key_result_templates |
JSONB |
no |
'[]' |
β |
β |
| is_system |
BOOLEAN |
no |
FALSE |
β |
β |
| usage_count |
INTEGER |
no |
0 |
β |
β |
| created_by |
UUID |
yes |
β |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| updated_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |