diff --git a/bootstrap/sql/migrations/native/1.6.3/mysql/schemaChanges.sql b/bootstrap/sql/migrations/native/1.6.3/mysql/schemaChanges.sql index 1bd78fc4dc8..0c3231f17da 100644 --- a/bootstrap/sql/migrations/native/1.6.3/mysql/schemaChanges.sql +++ b/bootstrap/sql/migrations/native/1.6.3/mysql/schemaChanges.sql @@ -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); \ No newline at end of file +CREATE INDEX idx_isBot ON user_entity (isBot); +DELETE from apps_data_store; \ No newline at end of file diff --git a/bootstrap/sql/migrations/native/1.6.3/postgres/schemaChanges.sql b/bootstrap/sql/migrations/native/1.6.3/postgres/schemaChanges.sql index af2c924354d..cb734e7b0c6 100644 --- a/bootstrap/sql/migrations/native/1.6.3/postgres/schemaChanges.sql +++ b/bootstrap/sql/migrations/native/1.6.3/postgres/schemaChanges.sql @@ -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); \ No newline at end of file +CREATE INDEX idx_isBot ON user_entity (isBot); +DELETE from apps_data_store; \ No newline at end of file