From 83c07d668057b22c23a10a2d7e49c7a1936c9e52 Mon Sep 17 00:00:00 2001 From: He Weiwei Date: Thu, 12 Nov 2020 15:34:04 +0800 Subject: [PATCH] fix: ensure the role_id of role is correct (#13476) Closes #13317 Signed-off-by: He Weiwei --- make/migrations/postgresql/0050_2.2.0_schema.up.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/make/migrations/postgresql/0050_2.2.0_schema.up.sql b/make/migrations/postgresql/0050_2.2.0_schema.up.sql index 216e74329..dc54298dc 100644 --- a/make/migrations/postgresql/0050_2.2.0_schema.up.sql +++ b/make/migrations/postgresql/0050_2.2.0_schema.up.sql @@ -1,3 +1,10 @@ +/* +Fixes issue https://github.com/goharbor/harbor/issues/13317 + Ensure the role_id of maintainer is 4 and the role_id of limisted guest is 5 +*/ +UPDATE role SET role_id=4 WHERE name='maintainer' AND role_id!=4; +UPDATE role SET role_id=5 WHERE name='limitedGuest' AND role_id!=5; + ALTER TABLE schedule ADD COLUMN IF NOT EXISTS cron_type varchar(64); DO $$