Skip to content

Commit 807825b

Browse files
committed
fix: add a migration to fix keyresults without commit and/or target values #1679
1 parent f14c575 commit 807825b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
UPDATE okr_pitc.key_result
2+
SET
3+
target_value = ROUND((baseline + (stretch_goal - baseline) * 0.7)::numeric, 2),
4+
commit_value = ROUND((baseline + (stretch_goal - baseline) * 0.3)::numeric, 2)
5+
WHERE baseline IS NOT NULL
6+
AND stretch_goal IS NOT NULL
7+
AND target_value is NULL
8+
AND commit_value is NULL;

0 commit comments

Comments
 (0)