From f952a792b697d6449787f6b41713dcdb1ea5f90c Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Mon, 6 May 2024 16:24:00 +0200 Subject: [PATCH] fixed `tumonline_room_nr` not being set --- .../20240505224430_fix-calendar-id-not-extracted.up.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/main-api/migrations/20240505224430_fix-calendar-id-not-extracted.up.sql b/server/main-api/migrations/20240505224430_fix-calendar-id-not-extracted.up.sql index 6db63d0d2..6e508a8f0 100644 --- a/server/main-api/migrations/20240505224430_fix-calendar-id-not-extracted.up.sql +++ b/server/main-api/migrations/20240505224430_fix-calendar-id-not-extracted.up.sql @@ -15,6 +15,8 @@ alter table de add column type_common_name TEXT NOT NULL GENERATED ALWAYS AS (CA alter table de drop column type; alter table de add column type TEXT NOT NULL GENERATED ALWAYS AS (CAST (data->>'type' AS TEXT)) STORED; alter table de add column calendar_url TEXT GENERATED ALWAYS AS (CAST (data->'props'->>'calendar_url' AS TEXT)) STORED; +alter table de drop column tumonline_room_nr; +alter table de add column tumonline_room_nr TEXT GENERATED ALWAYS AS (CAST (data->'props'->>'tumonline_room_nr' AS INTEGER)) STORED; alter table en alter column data type json using data::json; alter table en drop column lat; @@ -28,3 +30,5 @@ alter table en add column type_common_name TEXT NOT NULL GENERATED ALWAYS AS (CA alter table en drop column type; alter table en add column type TEXT NOT NULL GENERATED ALWAYS AS (CAST (data->>'type' AS TEXT)) STORED; alter table en add column calendar_url TEXT GENERATED ALWAYS AS (CAST (data->'props'->>'calendar_url' AS TEXT)) STORED; +alter table en drop column tumonline_room_nr; +alter table en add column tumonline_room_nr TEXT GENERATED ALWAYS AS (CAST (data->'props'->>'tumonline_room_nr' AS INTEGER)) STORED;