From f10ab67c6c40be3d3de5e418dd31716de06ff517 Mon Sep 17 00:00:00 2001 From: Rikard Bartholf Date: Mon, 16 Oct 2023 09:29:08 +0200 Subject: [PATCH] Create view for funnel (#354) * Create view for funnel * Cleanup * Cleanup * Remove SEK and RUB from list * Fix migration numbering --- migrations/000.443.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 migrations/000.443.sql diff --git a/migrations/000.443.sql b/migrations/000.443.sql new file mode 100644 index 0000000..83e610e --- /dev/null +++ b/migrations/000.443.sql @@ -0,0 +1,10 @@ +CREATE OR REPLACE VIEW v_funnel_currencies +AS +SELECT iso3char AS iso_code, + ROUND(exchange_rate * 100, 2) exchange_rate, + updated + FROM "i18n-currencies" + WHERE NOT iso3char IN ('SEK', 'RUB'); + +GRANT SELECT ON TABLE public.v_funnel_currencies TO funnel; +GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE public.v_funnel_currencies TO photowall;