From 22bca20c49c362b2735c3933f2da975da9e55808 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Thu, 20 Oct 2022 10:53:47 +0200 Subject: [PATCH] code cleanup: remove unnecessary "raise notice" --- src/main/resources/db/changelog/050-rbac-base.sql | 8 -------- src/main/resources/db/changelog/057-rbac-role-builder.sql | 1 - .../db/changelog/118-test-customer-test-data.sql | 1 - 3 files changed, 10 deletions(-) diff --git a/src/main/resources/db/changelog/050-rbac-base.sql b/src/main/resources/db/changelog/050-rbac-base.sql index 04e18c4c..c906d111 100644 --- a/src/main/resources/db/changelog/050-rbac-base.sql +++ b/src/main/resources/db/changelog/050-rbac-base.sql @@ -259,9 +259,6 @@ begin roleTypeFromRoleIdName = split_part(roleParts, '#', 3); objectUuidOfRole = findObjectUuidByIdName(objectTableFromRoleIdName, objectNameFromRoleIdName); - raise notice $sql$findObjectUuidByIdName('%', '%') = %;$sql$, objectTableFromRoleIdName, objectNameFromRoleIdName, objectUuidOfRole; - raise notice 'finding %, % (%), %', objectTableFromRoleIdName, objectNameFromRoleIdName, objectUuidOfRole, roleTypeFromRoleIdName; - select uuid from RbacRole where objectUuid = objectUuidOfRole @@ -406,7 +403,6 @@ declare refId uuid; permissionIds uuid[] = array []::uuid[]; begin - raise notice 'createPermission for: % %', forObjectUuid, permitOps; if (forObjectUuid is null) then raise exception 'forObjectUuid must not be null'; end if; @@ -418,7 +414,6 @@ begin loop refId = (select uuid from RbacPermission where objectUuid = forObjectUuid and op = permitOps[i]); if (refId is null) then - raise notice 'createPermission: % %', forObjectUuid, permitOps[i]; insert into RbacReference ("type") values ('RbacPermission') @@ -427,11 +422,9 @@ begin into RbacPermission (uuid, objectUuid, op) values (refId, forObjectUuid, permitOps[i]); end if; - raise notice 'addPermission: %', refId; permissionIds = permissionIds || refId; end loop; - raise notice 'createPermissions returning: %', permissionIds; return permissionIds; end; $$; @@ -559,7 +552,6 @@ $$; create or replace procedure grantPermissionsToRole(roleUuid uuid, permissionIds uuid[]) language plpgsql as $$ begin - raise notice 'grantPermissionsToRole: % -> %', roleUuid, permissionIds; if cardinality(permissionIds) = 0 then return; end if; for i in array_lower(permissionIds, 1)..array_upper(permissionIds, 1) diff --git a/src/main/resources/db/changelog/057-rbac-role-builder.sql b/src/main/resources/db/changelog/057-rbac-role-builder.sql index e95111b5..81a81590 100644 --- a/src/main/resources/db/changelog/057-rbac-role-builder.sql +++ b/src/main/resources/db/changelog/057-rbac-role-builder.sql @@ -55,7 +55,6 @@ declare userUuid uuid; grantedByRoleUuid uuid; begin - raise notice 'will createRole for %', roleDescriptor; roleUuid := createRole(roleDescriptor); if cardinality(permissions) >0 then diff --git a/src/main/resources/db/changelog/118-test-customer-test-data.sql b/src/main/resources/db/changelog/118-test-customer-test-data.sql index f148d421..353b8f59 100644 --- a/src/main/resources/db/changelog/118-test-customer-test-data.sql +++ b/src/main/resources/db/changelog/118-test-customer-test-data.sql @@ -36,7 +36,6 @@ begin custRowId = uuid_generate_v4(); custAdminName = 'customer-admin@' || custPrefix || '.example.com'; - raise notice 'creating customer %:%', custReference, custPrefix; insert into test_customer (reference, prefix, adminUserName) values (custReference, custPrefix, custAdminName);