From 907575525e54a8abb6b419d366113f9cb252de22 Mon Sep 17 00:00:00 2001 From: youngkidwarrior Date: Fri, 18 Oct 2024 15:38:56 -0700 Subject: [PATCH] Revert changes to already applied migration --- ...p_usage_metrics_in_distribution_verification_view.sql | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/supabase/migrations/20241015041504_app_usage_metrics_in_distribution_verification_view.sql b/supabase/migrations/20241015041504_app_usage_metrics_in_distribution_verification_view.sql index 031a39173..b6be87608 100644 --- a/supabase/migrations/20241015041504_app_usage_metrics_in_distribution_verification_view.sql +++ b/supabase/migrations/20241015041504_app_usage_metrics_in_distribution_verification_view.sql @@ -41,11 +41,10 @@ SELECT BOOL_OR(bc.type = 'send_one_hundred'::public.verification_type) AS has_send_one_hundred, BOOL_OR(bc.type = 'create_passkey'::public.verification_type) AS has_create_passkey, jsonb_object_agg(bc.type, jsonb_build_object('value', CASE WHEN bc.type_count = 0 THEN - 1 - WHEN bc.type = 'total_tag_referrals'::public.verification_type THEN - LEAST(dvv.multiplier_min +((bc.total_referrals) * dvv.multiplier_step), dvv.multiplier_max) - ELSE - LEAST(dvv.multiplier_min +((bc.type_count - 1) * dvv.multiplier_step), dvv.multiplier_max) + 0 + ELSE + -- @todo double check that when count = 1, this value = min + LEAST(dvv.multiplier_min +(bc.type_count - 1) * dvv.multiplier_step, dvv.multiplier_max) END, 'multiplier_min', dvv.multiplier_min, 'multiplier_max', dvv.multiplier_max, 'multiplier_step', dvv.multiplier_step)) AS multipliers FROM base_counts bc