mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-09 01:28:11 +00:00

- Add default field to role - Amend GET /roles to query default roles - Assign default role to new users being created
8 lines
305 B
SQL
8 lines
305 B
SQL
-- Set default as false for all existing roles, to avoid unintended manipulation of roles during migration.
|
|
UPDATE role_entity
|
|
SET json = JSON_SET(json, '$.default', FALSE);
|
|
|
|
ALTER TABLE role_entity
|
|
ADD COLUMN `default` BOOLEAN GENERATED ALWAYS AS (JSON_EXTRACT(json, '$.default')),
|
|
ADD INDEX(`default`);
|