diff --git a/src/main/resources/changelog/changes/v4.0/create-reindex-entity-tables.xml b/src/main/resources/changelog/changes/v4.0/create-reindex-entity-tables.xml
index 932d2b4c2..05efb6b62 100644
--- a/src/main/resources/changelog/changes/v4.0/create-reindex-entity-tables.xml
+++ b/src/main/resources/changelog/changes/v4.0/create-reindex-entity-tables.xml
@@ -246,7 +246,7 @@
-
+
@@ -298,11 +298,4 @@
-
-
-
-
-
-
-
diff --git a/src/main/resources/changelog/changes/v4.0/update-reindex-status-trigger-fix.sql b/src/main/resources/changelog/changes/v4.0/update-reindex-status-trigger-fix.sql
deleted file mode 100644
index ce5ff11fb..000000000
--- a/src/main/resources/changelog/changes/v4.0/update-reindex-status-trigger-fix.sql
+++ /dev/null
@@ -1,22 +0,0 @@
-CREATE OR REPLACE FUNCTION update_reindex_status_trigger()
-RETURNS TRIGGER AS $$
-BEGIN
- -- update status and end time for merge
- IF OLD.status = 'MERGE_IN_PROGRESS' and NEW.total_merge_ranges = NEW.processed_merge_ranges
- THEN NEW.status = 'MERGE_COMPLETED'; NEW.end_time_merge = current_timestamp;
- ELSE
- -- update status and end time for upload
- IF OLD.status = 'UPLOAD_IN_PROGRESS' and NEW.total_upload_ranges = NEW.processed_upload_ranges
- THEN NEW.status = 'UPLOAD_COMPLETED'; NEW.end_time_upload = current_timestamp;
- END IF;
- END IF;
- RETURN NEW;
-END;
-$$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS reindex_status_updated_trigger ON reindex_status CASCADE;
-CREATE TRIGGER reindex_status_updated_trigger
- BEFORE UPDATE OF processed_merge_ranges, processed_upload_ranges
- ON reindex_status
- FOR EACH ROW
- EXECUTE FUNCTION update_reindex_status_trigger();
diff --git a/src/main/resources/changelog/changes/v4.0/update-reindex-status-trigger.sql b/src/main/resources/changelog/changes/v4.0/update-reindex-status-trigger.sql
index 6957d459d..ce5ff11fb 100644
--- a/src/main/resources/changelog/changes/v4.0/update-reindex-status-trigger.sql
+++ b/src/main/resources/changelog/changes/v4.0/update-reindex-status-trigger.sql
@@ -16,7 +16,7 @@ $$ LANGUAGE plpgsql;
DROP TRIGGER IF EXISTS reindex_status_updated_trigger ON reindex_status CASCADE;
CREATE TRIGGER reindex_status_updated_trigger
- BEFORE UPDATE
+ BEFORE UPDATE OF processed_merge_ranges, processed_upload_ranges
ON reindex_status
FOR EACH ROW
EXECUTE FUNCTION update_reindex_status_trigger();