Merge branch 'RED-10482-bp' into 'release/2.589.x'
RED-10482: Indices not created correctly via liquibase See merge request redactmanager/persistence-service!868
This commit is contained in:
commit
5abd1d1ec9
@ -20,7 +20,6 @@ import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemp
|
|||||||
import com.iqser.red.service.persistence.service.v1.api.shared.mongo.service.ComponentLogMongoService;
|
import com.iqser.red.service.persistence.service.v1.api.shared.mongo.service.ComponentLogMongoService;
|
||||||
import com.iqser.red.service.search.v1.model.IndexMessageType;
|
import com.iqser.red.service.search.v1.model.IndexMessageType;
|
||||||
|
|
||||||
import groovy.transform.Field;
|
|
||||||
import jakarta.transaction.Transactional;
|
import jakarta.transaction.Transactional;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -44,7 +43,6 @@ public class FileDeletionService {
|
|||||||
FileStatusPersistenceService fileStatusPersistenceService;
|
FileStatusPersistenceService fileStatusPersistenceService;
|
||||||
FileManagementStorageService fileManagementStorageService;
|
FileManagementStorageService fileManagementStorageService;
|
||||||
IndexingService indexingService;
|
IndexingService indexingService;
|
||||||
ComponentLogService componentLogService;
|
|
||||||
ComponentLogMongoService componentLogMongoService;
|
ComponentLogMongoService componentLogMongoService;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
<databaseChangeLog
|
|
||||||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.20.xsd">
|
|
||||||
<include file="/mongo/changelog/tenant/1-initial-database.changelog.xml"/>
|
|
||||||
<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"/>-->
|
|
||||||
<!-- <include file="/mongo/changelog/tenant/6-rename-component-collections.xml"/>-->
|
|
||||||
<include file="/mongo/changelog/tenant/7-add-entity-log-value-index.xml"/>
|
|
||||||
<!-- THIS FILE IS NOT RUN IN THE CURRENT CONFIGURATION, PLEASE ADD CHANGES TO redaction-service -->
|
|
||||||
</databaseChangeLog>
|
|
||||||
@ -1,224 +0,0 @@
|
|||||||
<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="createEntityLogEntryCollection" author="maverick">
|
|
||||||
|
|
||||||
<ext:createCollection collectionName="entity-log-entries">
|
|
||||||
<ext:options>
|
|
||||||
{
|
|
||||||
validator: {
|
|
||||||
$jsonSchema: {
|
|
||||||
bsonType: "object",
|
|
||||||
required: ["entryId", "entityLogId", "type", "entryType", "state", "value", "reason", "matchedRule", "legalBasis", "containingNodeId", "closestHeadline", "section",
|
|
||||||
"positions", "textBefore", "textAfter", "startOffset", "endOffset", "imageHasTransparency", "dictionaryEntry", "dossierDictionaryEntry", "excluded", "changes",
|
|
||||||
"manualChanges", "engines", "reference", "importedRedactionIntersections", "numberOfComments"],
|
|
||||||
properties: {
|
|
||||||
entryId: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The Entry ID"
|
|
||||||
},
|
|
||||||
entityLogId: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The Entity Log ID"
|
|
||||||
},
|
|
||||||
type: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The Type"
|
|
||||||
},
|
|
||||||
entryType: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The Entry Type"
|
|
||||||
},
|
|
||||||
state: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The Entry State"
|
|
||||||
},
|
|
||||||
value: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The Value"
|
|
||||||
},
|
|
||||||
reason: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The Reason"
|
|
||||||
},
|
|
||||||
matchedRule: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The Matched Rule"
|
|
||||||
},
|
|
||||||
legalBasis: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The Legal Basis"
|
|
||||||
},
|
|
||||||
containingNodeId: {
|
|
||||||
bsonType: "array",
|
|
||||||
items: {
|
|
||||||
bsonType: "int",
|
|
||||||
description: "The Containing Node ID"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
closestHeadline: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The Closest Headline"
|
|
||||||
},
|
|
||||||
section: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The Section"
|
|
||||||
},
|
|
||||||
positions: {
|
|
||||||
bsonType: "array",
|
|
||||||
description: "The Positions",
|
|
||||||
items: {
|
|
||||||
bsonType: "object"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
textBefore: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "Text before the entry"
|
|
||||||
},
|
|
||||||
textAfter: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "Text after the entry"
|
|
||||||
},
|
|
||||||
startOffset: {
|
|
||||||
bsonType: "int",
|
|
||||||
description: "Start offset of the entry"
|
|
||||||
},
|
|
||||||
endOffset: {
|
|
||||||
bsonType: "int",
|
|
||||||
description: "End offset of the entry"
|
|
||||||
},
|
|
||||||
imageHasTransparency: {
|
|
||||||
bsonType: "bool",
|
|
||||||
description: "Whether the image has transparency"
|
|
||||||
},
|
|
||||||
dictionaryEntry: {
|
|
||||||
bsonType: "bool",
|
|
||||||
description: "Whether it's a dictionary entry"
|
|
||||||
},
|
|
||||||
dossierDictionaryEntry: {
|
|
||||||
bsonType: "bool",
|
|
||||||
description: "Whether it's a dossier dictionary entry"
|
|
||||||
},
|
|
||||||
excluded: {
|
|
||||||
bsonType: "bool",
|
|
||||||
description: "Whether it's excluded"
|
|
||||||
},
|
|
||||||
changes: {
|
|
||||||
bsonType: "array",
|
|
||||||
description: "The Changes",
|
|
||||||
items: {
|
|
||||||
bsonType: "object"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
manualChanges: {
|
|
||||||
bsonType: "array",
|
|
||||||
description: "The Manual Changes",
|
|
||||||
items: {
|
|
||||||
bsonType: "object"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
engines: {
|
|
||||||
bsonType: "array",
|
|
||||||
description: "The Engines",
|
|
||||||
items: {
|
|
||||||
bsonType: "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
reference: {
|
|
||||||
bsonType: "array",
|
|
||||||
description: "The Reference",
|
|
||||||
items: {
|
|
||||||
bsonType: "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
importedRedactionIntersections: {
|
|
||||||
bsonType: "array",
|
|
||||||
description: "The Imported Redaction Intersections",
|
|
||||||
items: {
|
|
||||||
bsonType: "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
numberOfComments: {
|
|
||||||
bsonType: "int",
|
|
||||||
description: "The Number of Comments"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
validationAction: "warn",
|
|
||||||
validationLevel: "strict"
|
|
||||||
}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createCollection>
|
|
||||||
|
|
||||||
<ext:createCollection collectionName="entity-logs">
|
|
||||||
<ext:options>
|
|
||||||
{
|
|
||||||
validator: {
|
|
||||||
$jsonSchema: {
|
|
||||||
bsonType: "object",
|
|
||||||
required: ["dossierId", "fileId", "analysisVersion", "analysisNumber", "entityLogEntryDocument", "legalBasis"],
|
|
||||||
properties: {
|
|
||||||
dossierId: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The Dossier ID"
|
|
||||||
},
|
|
||||||
fileId: {
|
|
||||||
bsonType: "string",
|
|
||||||
description: "The File ID"
|
|
||||||
},
|
|
||||||
analysisVersion: {
|
|
||||||
bsonType: "long",
|
|
||||||
description: "The Analysis Version"
|
|
||||||
},
|
|
||||||
analysisNumber: {
|
|
||||||
bsonType: "int",
|
|
||||||
description: "The Analysis Number"
|
|
||||||
},
|
|
||||||
entityLogEntryDocument: {
|
|
||||||
bsonType: "array",
|
|
||||||
description: "The Entity Log Entry Documents",
|
|
||||||
items: {
|
|
||||||
bsonType: "objectId"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
legalBasis: {
|
|
||||||
bsonType: "array",
|
|
||||||
description: "The Legal Basis",
|
|
||||||
items: {
|
|
||||||
bsonType: "object"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dictionaryVersion: {
|
|
||||||
bsonType: "long",
|
|
||||||
description: "The Dictionary Version"
|
|
||||||
},
|
|
||||||
dossierDictionaryVersion: {
|
|
||||||
bsonType: "long",
|
|
||||||
description: "The Dossier Dictionary Version"
|
|
||||||
},
|
|
||||||
rulesVersion: {
|
|
||||||
bsonType: "long",
|
|
||||||
description: "The Rules Version"
|
|
||||||
},
|
|
||||||
legalBasisVersion: {
|
|
||||||
bsonType: "long",
|
|
||||||
description: "The Legal Basis Version"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
validationAction: "warn",
|
|
||||||
validationLevel: "strict"
|
|
||||||
}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createCollection>
|
|
||||||
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
|
|
||||||
</databaseChangeLog>
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
<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="createEntityLogEntryCollection" author="maverick">
|
|
||||||
|
|
||||||
<ext:createCollection collectionName="entity-log-entries"/>
|
|
||||||
|
|
||||||
<ext:createCollection collectionName="entity-logs"/>
|
|
||||||
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
|
|
||||||
</databaseChangeLog>
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
<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="createIndicesForEntries" author="maverick">
|
|
||||||
|
|
||||||
<ext:createIndex collectionName="entity-log-entries">
|
|
||||||
<ext:keys>
|
|
||||||
{
|
|
||||||
"entityLogId": 1,
|
|
||||||
}
|
|
||||||
</ext:keys>
|
|
||||||
<ext:options>
|
|
||||||
{name: "entityLogId_index"}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createIndex>
|
|
||||||
|
|
||||||
<ext:createIndex collectionName="entity-log-entries">
|
|
||||||
<ext:keys>
|
|
||||||
{
|
|
||||||
"entityLogId": 1,
|
|
||||||
"positions.pageNumber": 1
|
|
||||||
}
|
|
||||||
</ext:keys>
|
|
||||||
<ext:options>
|
|
||||||
{name: "entityLogId_positionsPageNumber_index"}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createIndex>
|
|
||||||
|
|
||||||
<ext:createIndex collectionName="entity-log-entries">
|
|
||||||
<ext:keys>
|
|
||||||
{
|
|
||||||
"entityLogId": 1,
|
|
||||||
"containingNodeId": 1
|
|
||||||
}
|
|
||||||
</ext:keys>
|
|
||||||
<ext:options>
|
|
||||||
{name: "entityLogId_containingNodeId_index"}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createIndex>
|
|
||||||
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
|
|
||||||
</databaseChangeLog>
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
<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="3" author="aisvoran">
|
|
||||||
<ext:runCommand>
|
|
||||||
<ext:command>
|
|
||||||
{
|
|
||||||
update: "entity-log-entries",
|
|
||||||
updates: [
|
|
||||||
{
|
|
||||||
q: {},
|
|
||||||
u: { $set: { "paragraphPageIdx": -1 } },
|
|
||||||
multi: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
</ext:command>
|
|
||||||
</ext:runCommand>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
</databaseChangeLog>
|
|
||||||
@ -1,104 +0,0 @@
|
|||||||
<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="createComponentCollection" author="ali">
|
|
||||||
|
|
||||||
<ext:createCollection collectionName="component-logs">
|
|
||||||
<ext:options>
|
|
||||||
{
|
|
||||||
"validator": {
|
|
||||||
"$jsonSchema": {
|
|
||||||
"bsonType": "object",
|
|
||||||
"required": ["id", "dossierId", "fileId", "analysisNumber", "componentRulesVersion", "components"],
|
|
||||||
"properties": {
|
|
||||||
"id": {
|
|
||||||
"bsonType": "string",
|
|
||||||
"description": "must be a string and is required"
|
|
||||||
},
|
|
||||||
"dossierId": {
|
|
||||||
"bsonType": "string",
|
|
||||||
"description": "must be a string and is required"
|
|
||||||
},
|
|
||||||
"fileId": {
|
|
||||||
"bsonType": "string",
|
|
||||||
"description": "must be a string and is required"
|
|
||||||
},
|
|
||||||
"analysisNumber": {
|
|
||||||
"bsonType": "int",
|
|
||||||
"description": "must be an integer and is required"
|
|
||||||
},
|
|
||||||
"componentRulesVersion": {
|
|
||||||
"bsonType": "long",
|
|
||||||
"description": "must be a long and is required"
|
|
||||||
},
|
|
||||||
"components": {
|
|
||||||
"bsonType": "array",
|
|
||||||
"items": {
|
|
||||||
"bsonType": "objectId",
|
|
||||||
"description": "must be an array of objectIds"
|
|
||||||
},
|
|
||||||
"description": "must be an array and is required"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"validationLevel": "strict",
|
|
||||||
"validationAction": "error"
|
|
||||||
}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createCollection>
|
|
||||||
|
|
||||||
<ext:createCollection collectionName="component-log-entries">
|
|
||||||
<ext:options>
|
|
||||||
{
|
|
||||||
"validator": {
|
|
||||||
"$jsonSchema": {
|
|
||||||
"bsonType": "object",
|
|
||||||
"required": ["id", "componentLogId", "name", "overrideValues", "values", "overridden"],
|
|
||||||
"properties": {
|
|
||||||
"id": {
|
|
||||||
"bsonType": "string",
|
|
||||||
"description": "must be a string and is required"
|
|
||||||
},
|
|
||||||
"componentLogId": {
|
|
||||||
"bsonType": "string",
|
|
||||||
"description": "must be a string and is required"
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"bsonType": "string",
|
|
||||||
"description": "must be a string and is required"
|
|
||||||
},
|
|
||||||
"overrideValues": {
|
|
||||||
"bsonType": "array",
|
|
||||||
"items": {
|
|
||||||
"bsonType": "object"
|
|
||||||
},
|
|
||||||
"description": "must be an array of objects and is required"
|
|
||||||
},
|
|
||||||
"values": {
|
|
||||||
"bsonType": "array",
|
|
||||||
"items": {
|
|
||||||
"bsonType": "object"
|
|
||||||
},
|
|
||||||
"description": "must be an array of objects and is required"
|
|
||||||
},
|
|
||||||
"overridden": {
|
|
||||||
"bsonType": "bool",
|
|
||||||
"description": "must be a boolean and is required"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"validationLevel": "strict",
|
|
||||||
"validationAction": "warn"
|
|
||||||
}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createCollection>
|
|
||||||
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
</databaseChangeLog>
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
<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>
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
<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="renameComponentCollections" author="maverick">
|
|
||||||
<ext:adminCommand>
|
|
||||||
<ext:command>
|
|
||||||
{
|
|
||||||
"renameCollection": "${databaseName}.component-logs",
|
|
||||||
"to": "${databaseName}.old-component-logs"
|
|
||||||
}
|
|
||||||
</ext:command>
|
|
||||||
</ext:adminCommand>
|
|
||||||
|
|
||||||
<ext:adminCommand>
|
|
||||||
<ext:command>
|
|
||||||
{
|
|
||||||
"renameCollection": "${databaseName}.component-log-entries",
|
|
||||||
"to": "${databaseName}.old-component-log-entries"
|
|
||||||
}
|
|
||||||
</ext:command>
|
|
||||||
</ext:adminCommand>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
</databaseChangeLog>
|
|
||||||
@ -1,84 +0,0 @@
|
|||||||
<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="createIndicesForEntries" author="maverick">
|
|
||||||
|
|
||||||
<ext:createIndex collectionName="entity-log-entries">
|
|
||||||
<ext:keys>
|
|
||||||
{
|
|
||||||
"entityLogId": 1,
|
|
||||||
}
|
|
||||||
</ext:keys>
|
|
||||||
<ext:options>
|
|
||||||
{name: "entityLogId_index"}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createIndex>
|
|
||||||
|
|
||||||
<ext:createIndex collectionName="entity-log-entries">
|
|
||||||
<ext:keys>
|
|
||||||
{
|
|
||||||
"entityLogId": 1,
|
|
||||||
"positions.pageNumber": 1
|
|
||||||
}
|
|
||||||
</ext:keys>
|
|
||||||
<ext:options>
|
|
||||||
{name: "entityLogId_positionsPageNumber_index"}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createIndex>
|
|
||||||
|
|
||||||
<ext:createIndex collectionName="entity-log-entries">
|
|
||||||
<ext:keys>
|
|
||||||
{
|
|
||||||
"entityLogId": 1,
|
|
||||||
"changes.analysisNumber": -1
|
|
||||||
}
|
|
||||||
</ext:keys>
|
|
||||||
<ext:options>
|
|
||||||
{name: "entityLogId_changesAnalysisNumber_index"}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createIndex>
|
|
||||||
|
|
||||||
<ext:createIndex collectionName="entity-log-entries">
|
|
||||||
<ext:keys>
|
|
||||||
{
|
|
||||||
"entityLogId": 1,
|
|
||||||
"containingNodeId": 1
|
|
||||||
}
|
|
||||||
</ext:keys>
|
|
||||||
<ext:options>
|
|
||||||
{name: "entityLogId_containingNodeId_index"}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createIndex>
|
|
||||||
|
|
||||||
<ext:createIndex collectionName="entity-log-entries">
|
|
||||||
<ext:keys>
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"containingNodeId": 1
|
|
||||||
}
|
|
||||||
</ext:keys>
|
|
||||||
<ext:options>
|
|
||||||
{name: "id_containingNodeId_index"}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createIndex>
|
|
||||||
|
|
||||||
<ext:createIndex collectionName="entity-log-entries">
|
|
||||||
<ext:keys>
|
|
||||||
{
|
|
||||||
"entityLogId": 1,
|
|
||||||
"type": 1
|
|
||||||
}
|
|
||||||
</ext:keys>
|
|
||||||
<ext:options>
|
|
||||||
{name: "entityLogId_type_index"}
|
|
||||||
</ext:options>
|
|
||||||
</ext:createIndex>
|
|
||||||
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
|
|
||||||
</databaseChangeLog>
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
<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="1" author="maverick">
|
|
||||||
<ext:runCommand>
|
|
||||||
<ext:command>
|
|
||||||
{
|
|
||||||
update: "entity-log-entries",
|
|
||||||
updates: [
|
|
||||||
{
|
|
||||||
q: {},
|
|
||||||
u: { $unset: { "numberOfComments": "" } },
|
|
||||||
multi: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
</ext:command>
|
|
||||||
|
|
||||||
</ext:runCommand>
|
|
||||||
</changeSet>
|
|
||||||
|
|
||||||
</databaseChangeLog>
|
|
||||||
@ -10,7 +10,8 @@ dependencies {
|
|||||||
api("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.17.2")
|
api("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.17.2")
|
||||||
api("com.google.guava:guava:31.1-jre")
|
api("com.google.guava:guava:31.1-jre")
|
||||||
api("com.knecon.fforesight:mongo-database-commons:0.13.0+RED9348.0") {
|
api("com.knecon.fforesight:mongo-database-commons:0.13.0+RED9348.0") {
|
||||||
exclude(group = "com.iqser.red.commons", module = "storage-commons")
|
exclude(group = "com.knecon.fforesight", module = "storage-commons")
|
||||||
|
exclude(group = "org.liquibase.ext", module = "liquibase-mongodb")
|
||||||
}
|
}
|
||||||
api("org.springframework.boot:spring-boot-starter-data-mongodb:${springBootStarterVersion}")
|
api("org.springframework.boot:spring-boot-starter-data-mongodb:${springBootStarterVersion}")
|
||||||
api("org.springframework.boot:spring-boot-starter-validation:3.1.3")
|
api("org.springframework.boot:spring-boot-starter-validation:3.1.3")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user