From 73bb37e15511d8c932c19febc304886ec04f3c8b Mon Sep 17 00:00:00 2001 From: Thang PHAM Date: Mon, 16 Dec 2024 15:54:09 +0100 Subject: [PATCH] Migration MAXIMUM_Q_AT_NOMINAL_VOLTAGE to MAX_Q_AT_NOMINAL_V for modification by filter and by formula Signed-off-by: Thang PHAM --- .../changesets/changelog_20241216T142706Z.xml | 23 +++++++++++++++++++ .../db/changelog/db.changelog-master.yaml | 5 +++- ...mpensatorModificationByAssignmentTest.java | 2 +- ...tCompensatorByFormulaModificationTest.java | 4 ++-- 4 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/db/changelog/changesets/changelog_20241216T142706Z.xml diff --git a/src/main/resources/db/changelog/changesets/changelog_20241216T142706Z.xml b/src/main/resources/db/changelog/changesets/changelog_20241216T142706Z.xml new file mode 100644 index 000000000..15e2ef8ca --- /dev/null +++ b/src/main/resources/db/changelog/changesets/changelog_20241216T142706Z.xml @@ -0,0 +1,23 @@ + + + + + + edited_field='MAXIMUM_Q_AT_NOMINAL_VOLTAGE' + + + + + + edited_field='MAXIMUM_Q_AT_NOMINAL_VOLTAGE' + + + + equipment_field1='MAXIMUM_Q_AT_NOMINAL_VOLTAGE' + + + + equipment_field2='MAXIMUM_Q_AT_NOMINAL_VOLTAGE' + + + diff --git a/src/main/resources/db/changelog/db.changelog-master.yaml b/src/main/resources/db/changelog/db.changelog-master.yaml index 6f2ec9372..161c6a68d 100644 --- a/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/src/main/resources/db/changelog/db.changelog-master.yaml @@ -320,4 +320,7 @@ databaseChangeLog: file: changesets/changelog_20241015T130742Z.xml - include: relativeToChangelogFile: true - file: changesets/changelog_20241206T123930Z.xml \ No newline at end of file + file: changesets/changelog_20241206T123930Z.xml + - include: + relativeToChangelogFile: true + file: changesets/changelog_20241216T142706Z.xml \ No newline at end of file diff --git a/src/test/java/org/gridsuite/modification/server/modifications/byfilter/assignment/ShuntCompensatorModificationByAssignmentTest.java b/src/test/java/org/gridsuite/modification/server/modifications/byfilter/assignment/ShuntCompensatorModificationByAssignmentTest.java index 71030d0d7..1a0e3285a 100644 --- a/src/test/java/org/gridsuite/modification/server/modifications/byfilter/assignment/ShuntCompensatorModificationByAssignmentTest.java +++ b/src/test/java/org/gridsuite/modification/server/modifications/byfilter/assignment/ShuntCompensatorModificationByAssignmentTest.java @@ -100,7 +100,7 @@ protected List> getAssignmentInfos() { .build(); DoubleAssignmentInfos assignmentInfos4 = DoubleAssignmentInfos.builder() - .editedField(ShuntCompensatorField.MAXIMUM_Q_AT_NOMINAL_VOLTAGE.name()) + .editedField(ShuntCompensatorField.MAX_Q_AT_NOMINAL_V.name()) .value(10.) .filters(List.of(filter5)) .build(); diff --git a/src/test/java/org/gridsuite/modification/server/modifications/byfilter/formula/ShuntCompensatorByFormulaModificationTest.java b/src/test/java/org/gridsuite/modification/server/modifications/byfilter/formula/ShuntCompensatorByFormulaModificationTest.java index a78c92464..9d4a3bae1 100644 --- a/src/test/java/org/gridsuite/modification/server/modifications/byfilter/formula/ShuntCompensatorByFormulaModificationTest.java +++ b/src/test/java/org/gridsuite/modification/server/modifications/byfilter/formula/ShuntCompensatorByFormulaModificationTest.java @@ -104,10 +104,10 @@ protected List getFormulaInfos() { ReferenceFieldOrValue.builder().equipmentField(ShuntCompensatorField.MAXIMUM_SUSCEPTANCE.name()).build(), ReferenceFieldOrValue.builder().value(5.).build()); - FormulaInfos formulaInfos4 = getFormulaInfo(ShuntCompensatorField.MAXIMUM_Q_AT_NOMINAL_VOLTAGE.name(), + FormulaInfos formulaInfos4 = getFormulaInfo(ShuntCompensatorField.MAX_Q_AT_NOMINAL_V.name(), List.of(filter5), Operator.DIVISION, - ReferenceFieldOrValue.builder().equipmentField(ShuntCompensatorField.MAXIMUM_Q_AT_NOMINAL_VOLTAGE.name()).build(), + ReferenceFieldOrValue.builder().equipmentField(ShuntCompensatorField.MAX_Q_AT_NOMINAL_V.name()).build(), ReferenceFieldOrValue.builder().value(2.).build()); return List.of(formulaInfos1, formulaInfos2, formulaInfos3, formulaInfos4);