Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/resources/config/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ security-analysis:
highBound: 75
- nominalV: 90
lowBound: 75
highBound: 120
- nominalV: 150
lowBound: 120
highBound: 180
- nominalV: 225
lowBound: 180
Expand Down Expand Up @@ -103,5 +106,6 @@ security-analysis:
- [ 1, 1, 1, 1, 1, 1 ]
- [ 1, 1, 1, 1, 1, 1 ]
- [ 1, 1, 1, 1, 1, 1 ]
- [ 1, 1, 1, 1, 1, 1 ]
- [ 1, 1, 0.95, 0.95, 0.9, 0.9 ]
- [ 1, 1, 0.95, 0.95, 0.9, 0.9 ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<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">
<changeSet id="shift-limit-reductions-index" author="labidiayo">
<sql>
UPDATE limit_reduction_entity
SET index = index + 1
WHERE index &gt;= 4;
</sql>
</changeSet>

<changeSet id="insert-new-limit-reduction-entity-h2" author="labidiayo" dbms="h2">
<sql>
INSERT INTO limit_reduction_entity (id, security_analysis_parameters_id, index)
SELECT RANDOM_UUID(), id, 4
FROM security_analysis_parameters;
</sql>
</changeSet>

<changeSet id="insert-new-limit-reduction-entity-pg" author="labidiayo" dbms="postgresql">
<sql>
INSERT INTO limit_reduction_entity (id, security_analysis_parameters_id, index)
SELECT gen_random_uuid(), id, 4
FROM security_analysis_parameters;
</sql>
</changeSet>

<changeSet id="insert-reductions-for-new-entity" author="labidiayo" runOnChange="true">
<sql>
INSERT INTO limit_reduction_entity_reductions (limit_reduction_entity_id, reductions, index)
SELECT lre.id, v.reduction, v.idx
FROM limit_reduction_entity lre
CROSS JOIN (VALUES
(0, 1),
(1, 1),
(2, 1),
(3, 1),
(4, 1),
(5, 1)
) AS v(idx, reduction)
WHERE lre.index = 4;
</sql>
</changeSet>
</databaseChangeLog>
3 changes: 3 additions & 0 deletions src/main/resources/db/changelog/db.changelog-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ databaseChangeLog:
- include:
file: changesets/changelog_20250207T161145Z.xml
relativeToChangelogFile: true
- include:
file: changesets/changelog_20250807T090300Z.xml
relativeToChangelogFile: true