From 12ba38e0bcd7c0bd21886c94a505ca2b10cf0654 Mon Sep 17 00:00:00 2001 From: Ayoub LABIDI Date: Wed, 27 Aug 2025 10:22:25 +0200 Subject: [PATCH 1/2] Reset limit reductions Signed-off-by: Ayoub LABIDI --- .../changelog/changesets/changelog_20250827T095600Z.xml | 8 ++++++++ src/main/resources/db/changelog/db.changelog-master.yaml | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 src/main/resources/db/changelog/changesets/changelog_20250827T095600Z.xml diff --git a/src/main/resources/db/changelog/changesets/changelog_20250827T095600Z.xml b/src/main/resources/db/changelog/changesets/changelog_20250827T095600Z.xml new file mode 100644 index 00000000..c31926bb --- /dev/null +++ b/src/main/resources/db/changelog/changesets/changelog_20250827T095600Z.xml @@ -0,0 +1,8 @@ + + + + + TRUNCATE TABLE limit_reduction_entity CASCADE; + + + diff --git a/src/main/resources/db/changelog/db.changelog-master.yaml b/src/main/resources/db/changelog/db.changelog-master.yaml index 7d5d82d7..f8453852 100644 --- a/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/src/main/resources/db/changelog/db.changelog-master.yaml @@ -45,3 +45,6 @@ databaseChangeLog: - include: file: changesets/changelog_20250807T090300Z.xml relativeToChangelogFile: true + - include: + file: changesets/changelog_20250827T095600Z.xml + relativeToChangelogFile: true From 72647a8f65233b155bd3a06bb30e9ae64933f898 Mon Sep 17 00:00:00 2001 From: Ayoub LABIDI Date: Wed, 27 Aug 2025 11:10:22 +0200 Subject: [PATCH 2/2] Remove migration changelog Signed-off-by: Ayoub LABIDI --- .../changesets/changelog_20250807T090300Z.xml | 43 ------------------- .../db/changelog/db.changelog-master.yaml | 3 -- 2 files changed, 46 deletions(-) delete mode 100644 src/main/resources/db/changelog/changesets/changelog_20250807T090300Z.xml diff --git a/src/main/resources/db/changelog/changesets/changelog_20250807T090300Z.xml b/src/main/resources/db/changelog/changesets/changelog_20250807T090300Z.xml deleted file mode 100644 index 96ecc269..00000000 --- a/src/main/resources/db/changelog/changesets/changelog_20250807T090300Z.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - UPDATE limit_reduction_entity - SET index = index + 1 - WHERE index >= 4; - - - - - - INSERT INTO limit_reduction_entity (id, security_analysis_parameters_id, index) - SELECT RANDOM_UUID(), id, 4 - FROM security_analysis_parameters; - - - - - - INSERT INTO limit_reduction_entity (id, security_analysis_parameters_id, index) - SELECT gen_random_uuid(), id, 4 - FROM security_analysis_parameters; - - - - - - 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; - - - diff --git a/src/main/resources/db/changelog/db.changelog-master.yaml b/src/main/resources/db/changelog/db.changelog-master.yaml index f8453852..4c87c5db 100644 --- a/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/src/main/resources/db/changelog/db.changelog-master.yaml @@ -42,9 +42,6 @@ databaseChangeLog: - include: file: changesets/changelog_20250207T161145Z.xml relativeToChangelogFile: true - - include: - file: changesets/changelog_20250807T090300Z.xml - relativeToChangelogFile: true - include: file: changesets/changelog_20250827T095600Z.xml relativeToChangelogFile: true