From b76135eeb233721ca93ca3fb1eda3bd41f16dd56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Mee=C3=9Fen?= <14222414+cmeessen@users.noreply.github.com> Date: Fri, 13 Sep 2024 08:21:14 +0200 Subject: [PATCH] fix: change category column order and specify return types in category_path --- database/009-create-keyword-and-category.sql | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/database/009-create-keyword-and-category.sql b/database/009-create-keyword-and-category.sql index 85414358a..1204f38db 100644 --- a/database/009-create-keyword-and-category.sql +++ b/database/009-create-keyword-and-category.sql @@ -2,6 +2,7 @@ -- SPDX-FileCopyrightText: 2022 - 2024 Netherlands eScience Center -- SPDX-FileCopyrightText: 2023 - 2024 Felix Mühlbauer (GFZ) -- SPDX-FileCopyrightText: 2023 - 2024 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences +-- SPDX-FileCopyrightText: 2024 Christian Meeßen (GFZ) -- -- SPDX-License-Identifier: Apache-2.0 @@ -185,7 +186,15 @@ CREATE TRIGGER zzz_check_cycle_categories -- triggers are executed in alphabeti -- helper functions CREATE FUNCTION category_path(category_id UUID) -RETURNS TABLE (LIKE category) +RETURNS TABLE ( + id UUID, + parent UUID, + community UUID, + short_name VARCHAR, + name VARCHAR, + properties JSONB, + provenance_iri VARCHAR +) LANGUAGE SQL STABLE AS $$ WITH RECURSIVE cat_path AS (