Skip to content

Commit 6520c85

Browse files
authored
Update parameters : Add 150kV limit reductions (#191)
Signed-off-by: Ayoub LABIDI <[email protected]>
1 parent b4a4d41 commit 6520c85

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

src/main/resources/config/application.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ security-analysis:
7070
highBound: 75
7171
- nominalV: 90
7272
lowBound: 75
73+
highBound: 120
74+
- nominalV: 150
75+
lowBound: 120
7376
highBound: 180
7477
- nominalV: 225
7578
lowBound: 180
@@ -103,5 +106,6 @@ security-analysis:
103106
- [ 1, 1, 1, 1, 1, 1 ]
104107
- [ 1, 1, 1, 1, 1, 1 ]
105108
- [ 1, 1, 1, 1, 1, 1 ]
109+
- [ 1, 1, 1, 1, 1, 1 ]
106110
- [ 1, 1, 0.95, 0.95, 0.9, 0.9 ]
107111
- [ 1, 1, 0.95, 0.95, 0.9, 0.9 ]
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
2+
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:pro="http://www.liquibase.org/xml/ns/pro" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
3+
<changeSet id="shift-limit-reductions-index" author="labidiayo">
4+
<sql>
5+
UPDATE limit_reduction_entity
6+
SET index = index + 1
7+
WHERE index &gt;= 4;
8+
</sql>
9+
</changeSet>
10+
11+
<changeSet id="insert-new-limit-reduction-entity-h2" author="labidiayo" dbms="h2">
12+
<sql>
13+
INSERT INTO limit_reduction_entity (id, security_analysis_parameters_id, index)
14+
SELECT RANDOM_UUID(), id, 4
15+
FROM security_analysis_parameters;
16+
</sql>
17+
</changeSet>
18+
19+
<changeSet id="insert-new-limit-reduction-entity-pg" author="labidiayo" dbms="postgresql">
20+
<sql>
21+
INSERT INTO limit_reduction_entity (id, security_analysis_parameters_id, index)
22+
SELECT gen_random_uuid(), id, 4
23+
FROM security_analysis_parameters;
24+
</sql>
25+
</changeSet>
26+
27+
<changeSet id="insert-reductions-for-new-entity" author="labidiayo" runOnChange="true">
28+
<sql>
29+
INSERT INTO limit_reduction_entity_reductions (limit_reduction_entity_id, reductions, index)
30+
SELECT lre.id, v.reduction, v.idx
31+
FROM limit_reduction_entity lre
32+
CROSS JOIN (VALUES
33+
(0, 1),
34+
(1, 1),
35+
(2, 1),
36+
(3, 1),
37+
(4, 1),
38+
(5, 1)
39+
) AS v(idx, reduction)
40+
WHERE lre.index = 4;
41+
</sql>
42+
</changeSet>
43+
</databaseChangeLog>

src/main/resources/db/changelog/db.changelog-master.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ databaseChangeLog:
4242
- include:
4343
file: changesets/changelog_20250207T161145Z.xml
4444
relativeToChangelogFile: true
45+
- include:
46+
file: changesets/changelog_20250807T090300Z.xml
47+
relativeToChangelogFile: true

0 commit comments

Comments
 (0)