From c630dec2b9c7998f79f077b4ef6a1f227b12b221 Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 29 Jul 2024 17:27:59 +0200 Subject: [PATCH] 1433: add regionIdentifier for koblenz, since its needed for user data import --- .../ehrenamtskarte/backend/regions/database/Setup.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/backend/src/main/kotlin/app/ehrenamtskarte/backend/regions/database/Setup.kt b/backend/src/main/kotlin/app/ehrenamtskarte/backend/regions/database/Setup.kt index 595ec7d90..8080116ad 100644 --- a/backend/src/main/kotlin/app/ehrenamtskarte/backend/regions/database/Setup.kt +++ b/backend/src/main/kotlin/app/ehrenamtskarte/backend/regions/database/Setup.kt @@ -14,6 +14,7 @@ fun insertOrUpdateRegions() { regionProjectId: String, regionName: String, regionPrefix: String, + regionKey: String?, regionWebsite: String ) { val project = @@ -25,13 +26,14 @@ fun insertOrUpdateRegions() { projectId = project.id name = regionName prefix = regionPrefix - regionIdentifier = null + regionIdentifier = regionKey website = regionWebsite } } else { region.name = regionName region.prefix = regionPrefix region.website = regionWebsite + region.regionIdentifier = regionKey } } @@ -56,8 +58,8 @@ fun insertOrUpdateRegions() { dbRegion.website = eakRegion[3] } } - - createOrUpdateRegion(NUERNBERG_PASS_PROJECT, "Nürnberg", "Stadt", "https://nuernberg.de") - createOrUpdateRegion(KOBLENZ_PASS_PROJECT, "Koblenz", "Stadt", "https://koblenz.de/") + // TODO #1551: Adjust regionidentifier_unique constraint + createOrUpdateRegion(NUERNBERG_PASS_PROJECT, "Nürnberg", "Stadt", null, "https://nuernberg.de") + createOrUpdateRegion(KOBLENZ_PASS_PROJECT, "Koblenz", "Stadt", "07111", "https://koblenz.de/") } }