RED-9221 - Add duplicated text ranges for entity log in mongo

This commit is contained in:
Andrei Isvoran 2024-06-05 14:12:48 +03:00
parent b08a666022
commit b52ac441e9
3 changed files with 29 additions and 0 deletions

View File

@ -6,4 +6,5 @@
<include file="/mongo/changelog/tenant/2-create-indices-for-entries.xml"/>
<include file="/mongo/changelog/tenant/3-add-page-paragraph-idx.xml"/>
<include file="/mongo/changelog/tenant/4-create-component-entities.xml"/>
<include file="/mongo/changelog/tenant/5-add-duplicate-text-ranges.xml"/>
</databaseChangeLog>

View File

@ -0,0 +1,25 @@
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.20.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<changeSet id="add-duplicate-text-ranges" author="aisvoran">
<ext:runCommand>
<ext:command>
{
update: "entity-log-entries",
updates: [
{
q: {},
u: { $set: { "duplicatedTextRanges": [] } },
multi: true
}
]
}
</ext:command>
</ext:runCommand>
</changeSet>
</databaseChangeLog>

View File

@ -9,6 +9,7 @@ import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.Change;
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.DuplicatedTextRange;
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.Engine;
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntryState;
import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.entitylog.EntryType;
@ -74,4 +75,6 @@ public class EntityLogEntryDocument {
Set<String> importedRedactionIntersections = new HashSet<>();
List<DuplicatedTextRange> duplicatedTextRanges;
}