sonika-shah 4d473c8204
Fix 1.7.3 pending migrations (#22434)
* Fix 1.7.3 pending migrations

* move to 1.8.7

* move to 1.8.7
2025-07-21 20:58:11 -07:00

19 lines
843 B
SQL

-- Create table for tracking index mapping versions
CREATE TABLE IF NOT EXISTS index_mapping_versions (
entityType VARCHAR(256) NOT NULL,
mappingHash VARCHAR(32) NOT NULL,
mappingJson JSONB NOT NULL,
version VARCHAR(36) NOT NULL,
updatedAt BIGINT NOT NULL,
updatedBy VARCHAR(256) NOT NULL,
PRIMARY KEY (entityType)
);
CREATE INDEX IF NOT EXISTS idx_index_mapping_versions_version ON index_mapping_versions (version);
CREATE INDEX IF NOT EXISTS idx_index_mapping_versions_updatedAt ON index_mapping_versions (updatedAt);
-- remove old reset link email template
DELETE from doc_store where name = 'reset-link' and entityType = 'EmailTemplate';
-- In case 1.7.3 migrations executed , with --force , remove it from server_logs as it is covered in this migration
DELETE FROM SERVER_CHANGE_LOG WHERE version = '1.7.3';