Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
sisiphos3 committed Oct 28, 2023
1 parent 611cb65 commit 0456235
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions migrations/V36__add_user_to_kpi_definition.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
ALTER TABLE public.kpi_definition
ALTER COLUMN created_by SET DEFAULT auth.uid ();

CREATE OR REPLACE VIEW
DROP VIEW if exists public.kpi_definition_with_latest_values
CREATE VIEW
public.kpi_definition_with_latest_values as
select
ckd.circle_kpidef_id,
Expand Down Expand Up @@ -69,7 +70,8 @@ order by
kpi_id,
ckd.circle_kpidef_id;

CREATE or REPLACE VIEW
DROP VIEW if exists public.kpi_values_period_standardized
CREATE VIEW
public.kpi_values_period_standardized as
select *,
Case when target_value > 0 then ROUND(cumulative_value/target_value*100, 0) else null end as target_fulfilled
Expand Down

0 comments on commit 0456235

Please sign in to comment.