Script to resolve the Supervisor assignment limit to each Team
Problem Statement:
In our current structure, teams are implemented on Keycloak side as Groups and each team is assigned Supervisors using Group Attributes. The problem is that Keycloak Attribute only allows 255 character as value due to table schema limitation. Hence, we can only assign the number of supervisors that can fit with-in 255 character limit.
Solution:
Change the field value schema from VARCHAR(255) to TEXT in group_attribute table of keycloak_db.
Steps:
Copy the current password for your postgresql server pod
POWERSHELL
|
you will need this password in next command as POSTGRES User's password to connect and run the SQL Transaction.
POWERSHELL
|
Once inside postgresql db, run the below given Transaction block containing the following Query:
BEGIN;
--- changing the schema of value field inside group_attribute table from VARCHAR(255) to TEXT
ALTER TABLE group_attribute ALTER COLUMN value TYPE TEXT;
COMMIT;