mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-29 19:35:56 +00:00
update SettingsCache and fix migration issues (#16052)
* update SettingsCache and fix migration issues * java checkstyle change
This commit is contained in:
parent
26db024379
commit
c6afcce52d
@ -363,22 +363,26 @@ set json = JSON_INSERT(
|
|||||||
WHERE name = 'tableRowInsertedCountToBeBetween';
|
WHERE name = 'tableRowInsertedCountToBeBetween';
|
||||||
-- End of Test Definition Parameter Definition Validation Migration
|
-- End of Test Definition Parameter Definition Validation Migration
|
||||||
|
|
||||||
-- update existing customLogoConfiguration config with new customUiThemePreference
|
-- Start of updating existing customLogoConfiguration config with new customUiThemePreference
|
||||||
UPDATE openmetadata_settings
|
UPDATE openmetadata_settings AS ui
|
||||||
|
JOIN openmetadata_settings AS logo
|
||||||
|
ON ui.configType = 'customUiThemePreference' AND logo.configType = 'customLogoConfiguration'
|
||||||
SET
|
SET
|
||||||
configType = 'customUiThemePreference',
|
ui.json = JSON_OBJECT(
|
||||||
json = JSON_OBJECT(
|
|
||||||
'customTheme', JSON_OBJECT(
|
|
||||||
'infoColor', '',
|
|
||||||
'errorColor', '',
|
|
||||||
'primaryColor', '',
|
|
||||||
'successColor', '',
|
|
||||||
'warningColor', ''
|
|
||||||
),
|
|
||||||
'customLogoConfig', JSON_OBJECT(
|
'customLogoConfig', JSON_OBJECT(
|
||||||
'customLogoUrlPath', JSON_UNQUOTE(JSON_EXTRACT(json, '$.customLogoUrlPath')),
|
'customLogoUrlPath', JSON_UNQUOTE(JSON_EXTRACT(logo.json, '$.customLogoUrlPath')),
|
||||||
'customFaviconUrlPath', JSON_UNQUOTE(JSON_EXTRACT(json, '$.customFaviconUrlPath')),
|
'customFaviconUrlPath', JSON_UNQUOTE(JSON_EXTRACT(logo.json, '$.customFaviconUrlPath')),
|
||||||
'customMonogramUrlPath', JSON_UNQUOTE(JSON_EXTRACT(json, '$.customMonogramUrlPath'))
|
'customMonogramUrlPath', JSON_UNQUOTE(JSON_EXTRACT(logo.json, '$.customMonogramUrlPath'))
|
||||||
|
),
|
||||||
|
'customTheme', JSON_OBJECT(
|
||||||
|
'primaryColor', '',
|
||||||
|
'errorColor', '',
|
||||||
|
'successColor', '',
|
||||||
|
'warningColor', '',
|
||||||
|
'infoColor', ''
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
WHERE configType = 'customLogoConfiguration';
|
WHERE ui.configType = 'customUiThemePreference';
|
||||||
|
|
||||||
|
DELETE from openmetadata_settings where configType = 'customLogoConfiguration';
|
||||||
|
-- End of updating customUiThemePreference config
|
@ -363,22 +363,25 @@ SET json = jsonb_set(
|
|||||||
WHERE name = 'tableRowInsertedCountToBeBetween';
|
WHERE name = 'tableRowInsertedCountToBeBetween';
|
||||||
-- End of Test Definition Parameter Definition Validation Migration
|
-- End of Test Definition Parameter Definition Validation Migration
|
||||||
|
|
||||||
-- update existing customLogoConfiguration config with new customUiThemePreference
|
-- Start of updating existing customLogoConfiguration config with new customUiThemePreference
|
||||||
UPDATE openmetadata_settings
|
UPDATE openmetadata_settings AS ui
|
||||||
SET
|
SET json = jsonb_build_object(
|
||||||
configType = 'customUiThemePreference',
|
|
||||||
json = jsonb_build_object(
|
|
||||||
'customTheme', jsonb_build_object(
|
|
||||||
'infoColor', '',
|
|
||||||
'errorColor', '',
|
|
||||||
'primaryColor', '',
|
|
||||||
'successColor', '',
|
|
||||||
'warningColor', ''
|
|
||||||
),
|
|
||||||
'customLogoConfig', jsonb_build_object(
|
'customLogoConfig', jsonb_build_object(
|
||||||
'customLogoUrlPath', (json ->> 'customLogoUrlPath'),
|
'customLogoUrlPath', logo.json -> 'customLogoUrlPath',
|
||||||
'customFaviconUrlPath', (json ->> 'customFaviconUrlPath'),
|
'customFaviconUrlPath', logo.json -> 'customFaviconUrlPath',
|
||||||
'customMonogramUrlPath', (json ->> 'customMonogramUrlPath')
|
'customMonogramUrlPath', logo.json -> 'customMonogramUrlPath'
|
||||||
|
),
|
||||||
|
'customTheme', jsonb_build_object(
|
||||||
|
'primaryColor', '',
|
||||||
|
'errorColor', '',
|
||||||
|
'successColor', '',
|
||||||
|
'warningColor', '',
|
||||||
|
'infoColor', ''
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
WHERE configType = 'customLogoConfiguration';
|
FROM openmetadata_settings AS logo
|
||||||
|
WHERE ui.configType = 'customUiThemePreference'
|
||||||
|
AND logo.configType = 'customLogoConfiguration';
|
||||||
|
|
||||||
|
DELETE from openmetadata_settings where configType = 'customLogoConfiguration';
|
||||||
|
-- End of updating customUiThemePreference config
|
@ -84,6 +84,7 @@ public class SettingsCache {
|
|||||||
.withCustomLogoConfig(
|
.withCustomLogoConfig(
|
||||||
new LogoConfiguration()
|
new LogoConfiguration()
|
||||||
.withCustomLogoUrlPath("")
|
.withCustomLogoUrlPath("")
|
||||||
|
.withCustomFaviconUrlPath("")
|
||||||
.withCustomMonogramUrlPath(""))
|
.withCustomMonogramUrlPath(""))
|
||||||
.withCustomTheme(
|
.withCustomTheme(
|
||||||
new ThemeConfiguration()
|
new ThemeConfiguration()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user