mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-04 19:44:58 +00:00
Cleanup App data (#19571)
(cherry picked from commit cb7942f4b697fdc50904d4928b0e421f6410c54b)
This commit is contained in:
parent
5203092228
commit
49e30af135
@ -2,4 +2,5 @@
|
||||
ALTER TABLE apps_data_store ADD CONSTRAINT entity_relationship_pky PRIMARY KEY (identifier, type);
|
||||
UPDATE user_entity SET json = JSON_SET(json, '$.isBot', false) WHERE JSON_EXTRACT(json, '$.isBot') IS NULL;
|
||||
ALTER TABLE user_entity ADD COLUMN isBot BOOLEAN GENERATED ALWAYS AS (json -> '$.isBot') NOT NULL;
|
||||
CREATE INDEX idx_isBot ON user_entity (isBot);
|
||||
CREATE INDEX idx_isBot ON user_entity (isBot);
|
||||
DELETE from apps_data_store;
|
||||
@ -2,4 +2,5 @@
|
||||
ALTER TABLE apps_data_store ADD CONSTRAINT entity_relationship_pky PRIMARY KEY (identifier, type);
|
||||
UPDATE user_entity SET json = jsonb_set(json::jsonb, '{isBot}', 'false'::jsonb, true) WHERE NOT (json ?? 'isBot');
|
||||
ALTER TABLE user_entity ADD COLUMN isBot BOOLEAN GENERATED ALWAYS AS ((json ->> 'deleted')::boolean) STORED NOT NULL;
|
||||
CREATE INDEX idx_isBot ON user_entity (isBot);
|
||||
CREATE INDEX idx_isBot ON user_entity (isBot);
|
||||
DELETE from apps_data_store;
|
||||
Loading…
x
Reference in New Issue
Block a user