Skip to content

Commit c2cdce2

Browse files
committed
Add script for default voltage_level_id value
Signed-off-by: Igor PIROG <[email protected]>
1 parent 7539d17 commit c2cdce2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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 author="pirogigo" id="1756119288000-1">
4+
<update tableName="voltage_init_result_entity_bus_voltages">
5+
<column name="voltage_level_id"
6+
valueComputed="regexp_replace(bus_id, '_[0-9]{1,2}$', '')" />
7+
<where>voltage_level_id IS NULL</where>
8+
</update>
9+
</changeSet>
10+
<changeSet author="pirogigo" id="1756119288000-2">
11+
<update tableName="voltage_init_result_entity_reactive_slacks">
12+
<column name="voltage_level_id"
13+
valueComputed="regexp_replace(bus_id, '_[0-9]{1,2}$', '')" />
14+
<where>voltage_level_id IS NULL</where>
15+
</update>
16+
</changeSet>
17+
</databaseChangeLog>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ databaseChangeLog:
4545
- include:
4646
file: changesets/changelog_20250801T132858Z.xml
4747
relativeToChangelogFile: true
48+
- include:
49+
file: changesets/changelog_20250825T125400Z.xml
50+
relativeToChangelogFile: true

0 commit comments

Comments
 (0)