From f6e10f81bd767c7469acbc214acf0c3b8ad3bd13 Mon Sep 17 00:00:00 2001 From: Darcy Ye Date: Mon, 1 Jul 2024 15:51:41 +0800 Subject: [PATCH] chore: normalize Logto DB region role names for DB alteration CI (#6144) --- .scripts/compare-database.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.scripts/compare-database.js b/.scripts/compare-database.js index 5a44b4f2f..d30f41d52 100644 --- a/.scripts/compare-database.js +++ b/.scripts/compare-database.js @@ -104,6 +104,11 @@ const queryDatabaseManifest = async (database) => { return { ...rest, grantee: 'logto_tenant' }; } + // Removes the last segment of region grantee since Logto will use 'logto_region_xxx' for the role name for different regions. + if (grantee.startsWith('logto_region_')) { + return { ...rest, grantee: 'logto_region' }; + } + return { grantee, ...rest }; };