From 590ef749dfdb62cd76353124ee4be211ff3d6437 Mon Sep 17 00:00:00 2001 From: achour94 Date: Thu, 12 Jun 2025 16:48:30 +0200 Subject: [PATCH] Update formulas for switchedOnQAtNominalV and switchedOnSusceptance in spreadsheet configuration Signed-off-by: achour94 --- .../changesets/changelog_20250612T140000Z.xml | 22 +++++++++++++++++++ .../db/changelog/db.changelog-master.yaml | 3 +++ ...default-spreadsheet-config-collection.json | 4 ++-- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/db/changelog/changesets/changelog_20250612T140000Z.xml diff --git a/src/main/resources/db/changelog/changesets/changelog_20250612T140000Z.xml b/src/main/resources/db/changelog/changesets/changelog_20250612T140000Z.xml new file mode 100644 index 0000000..3f366a1 --- /dev/null +++ b/src/main/resources/db/changelog/changesets/changelog_20250612T140000Z.xml @@ -0,0 +1,22 @@ + + + + Update switchedOnQAtNominalV formula to use maxQAtNominalV / maximumSectionCount only if it hasn't been modified + + UPDATE spreadsheet_column + SET formula = 'maxQAtNominalV / maximumSectionCount' + WHERE column_id = 'switchedOnQAtNominalV' + AND formula = 'switchedOnQAtNominalV'; + + + + + Update switchedOnSusceptance formula to use maxSusceptance / maximumSectionCount only if it hasn't been modified + + UPDATE spreadsheet_column + SET formula = 'maxSusceptance / maximumSectionCount' + WHERE column_id = 'switchedOnSusceptance' + AND formula = 'switchedOnSusceptance'; + + + diff --git a/src/main/resources/db/changelog/db.changelog-master.yaml b/src/main/resources/db/changelog/db.changelog-master.yaml index 7cf9553..4f68682 100644 --- a/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/src/main/resources/db/changelog/db.changelog-master.yaml @@ -50,3 +50,6 @@ databaseChangeLog: - include: file: changesets/changelog_20250604T144112Z.xml relativeToChangelogFile: true + - include: + file: changesets/changelog_20250612T140000Z.xml + relativeToChangelogFile: true diff --git a/src/main/resources/default-spreadsheet-config-collection.json b/src/main/resources/default-spreadsheet-config-collection.json index 0b73190..ecc7b8b 100644 --- a/src/main/resources/default-spreadsheet-config-collection.json +++ b/src/main/resources/default-spreadsheet-config-collection.json @@ -1338,7 +1338,7 @@ "name": "Switch-on Q at nominal voltage", "type": "NUMBER", "precision": 1, - "formula": "switchedOnQAtNominalV", + "formula": "maxQAtNominalV / maximumSectionCount", "dependencies": null, "id": "switchedOnQAtNominalV" }, @@ -1354,7 +1354,7 @@ "name": "Switch-on susceptance", "type": "NUMBER", "precision": 5, - "formula": "switchedOnSusceptance", + "formula": "maxSusceptance / maximumSectionCount", "dependencies": null, "id": "switchedOnSusceptance" },