Skip to content

Commit

Permalink
Update database changelog and remove unused test method
Browse files Browse the repository at this point in the history
  • Loading branch information
jamal-khey committed Jan 30, 2024
1 parent a2dae20 commit 856ce0c
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ private boolean checkIfChangeRequestedOnDropActiveControl() {
&& modificationInfos.getDroop() == null
&& modificationInfos.getP0() == null;
}

private void hvdcAngleDroopActivePowerControlAdder(HvdcLine hvdcLine, Reporter subReporter) {
List<Report> reports = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?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 author="jamalk (generated)" id="1705666768219-29">
<changeSet author="jamalk (generated)" id="1706602661209-29">
<createTable tableName="converter_station_modification">
<column name="equipment_id" type="VARCHAR(255)"/>
<column name="equipment_name_op" type="VARCHAR(255)"/>
<column name="equipment_name_value" type="VARCHAR(255)"/>
<column name="bus_or_busbar_section_id_op" type="VARCHAR(255)"/>
<column name="bus_or_busbar_section_id_value" type="VARCHAR(255)"/>
<column name="connected_op" type="VARCHAR(255)"/>
<column name="connected" type="BOOLEAN"/>
<column name="voltage_level_id_op" type="VARCHAR(255)"/>
<column name="voltage_level_id_value" type="VARCHAR(255)"/>
<column name="loss_factor_op" type="VARCHAR(255)"/>
Expand All @@ -28,7 +30,7 @@
</column>
</createTable>
</changeSet>
<changeSet author="jamalk (generated)" id="1705666768219-30">
<changeSet author="jamalk (generated)" id="1706602661209-30">
<createTable tableName="converter_station_modification_rcc_points">
<column name="converter_station_modification_entity_id" type="UUID">
<constraints nullable="false"/>
Expand All @@ -41,7 +43,7 @@
<column name="qminp" type="FLOAT(53)"/>
</createTable>
</changeSet>
<changeSet author="jamalk (generated)" id="1705666768219-31">
<changeSet author="jamalk (generated)" id="1706602661209-31">
<createTable tableName="vsc_modification">
<column name="equipment_id" type="VARCHAR(255)"/>
<column name="equipment_name_op" type="VARCHAR(255)"/>
Expand Down Expand Up @@ -73,26 +75,64 @@
<column name="converter_station_2_id" type="UUID"/>
</createTable>
</changeSet>
<changeSet author="jamalk (generated)" id="1705666768219-45">
<changeSet author="jamalk (generated)" id="1706602661209-32">
<addUniqueConstraint columnNames="additional_equipment_deletion_entity_id" constraintName="UC_EQUIPMENT_DELETIONADDITIONAL_EQUIPMENT_DELETION_ENTITY_ID_COL" tableName="equipment_deletion"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-33">
<addUniqueConstraint columnNames="line_creation_id" constraintName="UC_LINE_ATTACH_TO_VOLTAGE_LEVELLINE_CREATION_ID_COL" tableName="line_attach_to_voltage_level"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-34">
<addUniqueConstraint columnNames="may_voltage_level_creation_id" constraintName="UC_LINE_ATTACH_TO_VOLTAGE_LEVELMAY_VOLTAGE_LEVEL_CREATION_ID_COL" tableName="line_attach_to_voltage_level"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-35">
<addUniqueConstraint columnNames="current_limits_id1" constraintName="UC_LINE_CREATIONCURRENT_LIMITS_ID1_COL" tableName="line_creation"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-36">
<addUniqueConstraint columnNames="current_limits_id2" constraintName="UC_LINE_CREATIONCURRENT_LIMITS_ID2_COL" tableName="line_creation"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-37">
<addUniqueConstraint columnNames="current_limits_modification_id1" constraintName="UC_LINE_MODIFICATIONCURRENT_LIMITS_MODIFICATION_ID1_COL" tableName="line_modification"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-38">
<addUniqueConstraint columnNames="current_limits_modification_id2" constraintName="UC_LINE_MODIFICATIONCURRENT_LIMITS_MODIFICATION_ID2_COL" tableName="line_modification"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-39">
<addUniqueConstraint columnNames="may_voltage_level_creation_id" constraintName="UC_LINE_SPLIT_WITH_VOLTAGE_LEVELMAY_VOLTAGE_LEVEL_CREATION_ID_C" tableName="line_split_with_voltage_level"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-40">
<addUniqueConstraint columnNames="current_limits_id1" constraintName="UC_TWO_WINDINGS_TRANSFORMER_CREATIONCURRENT_LIMITS_ID1_COL" tableName="two_windings_transformer_creation"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-41">
<addUniqueConstraint columnNames="current_limits_id2" constraintName="UC_TWO_WINDINGS_TRANSFORMER_CREATIONCURRENT_LIMITS_ID2_COL" tableName="two_windings_transformer_creation"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-42">
<addUniqueConstraint columnNames="current_limits_modification_id1" constraintName="UC_TWO_WINDINGS_TRANSFORMER_MODIFICATIONCURRENT_LIMITS_MODIFICA" tableName="two_windings_transformer_modification"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-43">
<addUniqueConstraint columnNames="converter_station_1_id" constraintName="UC_VSC_CREATIONCONVERTER_STATION_1_ID_COL" tableName="vsc_creation"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-44">
<addUniqueConstraint columnNames="converter_station_2_id" constraintName="UC_VSC_CREATIONCONVERTER_STATION_2_ID_COL" tableName="vsc_creation"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-45">
<addUniqueConstraint columnNames="converter_station_1_id" constraintName="UC_VSC_MODIFICATIONCONVERTER_STATION_1_ID_COL" tableName="vsc_modification"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1705666768219-46">
<changeSet author="jamalk (generated)" id="1706602661209-46">
<addUniqueConstraint columnNames="converter_station_2_id" constraintName="UC_VSC_MODIFICATIONCONVERTER_STATION_2_ID_COL" tableName="vsc_modification"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1705666768219-48">
<changeSet author="jamalk (generated)" id="1706602661209-47">
<createIndex indexName="IX_tabular_modification_modificationsPK" tableName="tabular_modification_modifications" unique="true">
<column name="tabular_modification_entity_id"/>
<column name="modifications_order"/>
</createIndex>
</changeSet>
<changeSet author="jamalk (generated)" id="1706602661209-49">
<addForeignKeyConstraint baseColumnNames="converter_station_modification_entity_id" baseTableName="converter_station_modification_rcc_points" constraintName="FKa1d66rwnqihum8e7burnweyr" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="converter_station_modification" validate="true"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1705666768219-49">
<changeSet author="jamalk (generated)" id="1706602661209-50">
<addForeignKeyConstraint baseColumnNames="id" baseTableName="vsc_modification" constraintName="FKo2vpsuh6othc7kfc7hmilkia5" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="modification" validate="true"/>
</changeSet>
<changeSet author="jamalk (generated)" id="1705666768219-50">
<changeSet author="jamalk (generated)" id="1706602661209-51">
<addForeignKeyConstraint baseColumnNames="id" baseTableName="converter_station_modification" constraintName="FKryub7wml7674krq1lwhn21jqw" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="modification" validate="true"/>
</changeSet>
<!-- bug in runtime-->
<!-- <changeSet author="jamalk (generated)" id="1705666768219-52">-->
<!-- <addForeignKeyConstraint baseColumnNames="converter_station_1_id" baseTableName="vsc_modification" constraintName="converter_station_1_id_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="converter_station_modification" validate="true"/>-->
<!-- </changeSet>-->
<!-- <changeSet author="jamalk (generated)" id="1705666768219-53">-->
<!-- <addForeignKeyConstraint baseColumnNames="converter_station_2_id" baseTableName="vsc_modification" constraintName="converter_station_2_id_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="converter_station_modification" validate="true"/>-->
<!-- </changeSet>-->
</databaseChangeLog>
2 changes: 1 addition & 1 deletion src/main/resources/db/changelog/db.changelog-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,5 @@ databaseChangeLog:
file: changesets/changelog_20240119T151936Z.xml
relativeToChangelogFile: true
- include:
file: changesets/changelog_20240119T121902Z.xml
file: changesets/changelog_20240130T081725Z.xml
relativeToChangelogFile: true
Original file line number Diff line number Diff line change
Expand Up @@ -235,23 +235,6 @@ public void testUnchangedHVDCngleDroopActivePowerControl() throws Exception {
Assert.assertTrue(activePowerControl.isEnabled());
}

@Test
public void testNoHVDCngleDroopActivePowerControlExtention() throws Exception {
var networkuuid = UUID.randomUUID();
Network networkWitoutExt = NetworkCreation.createWithVSC(networkuuid, false);
VscModificationInfos modificationInfos = (VscModificationInfos) buildModification();
modificationInfos.setAngleDroopActivePowerControl(new AttributeModification<>(null, OperationType.SET));
modificationInfos.setDroop(new AttributeModification<>(null, OperationType.SET));
modificationInfos.setP0(new AttributeModification<>(null, OperationType.SET));
VscModification vscModification = new VscModification(modificationInfos);
Reporter subReporter = new Reporter.NoOpImpl();
ComputationManager computationManager = new LocalComputationManager();
vscModification.apply(networkWitoutExt, true, computationManager, subReporter);
HvdcLine hvdcLine = networkWitoutExt.getHvdcLine("hvdcLine");
HvdcAngleDroopActivePowerControl activePowerControl = hvdcLine.getExtension(HvdcAngleDroopActivePowerControl.class);
assertNull(activePowerControl);
}

@Override
@SneakyThrows
protected void testUpdateModificationMessage(ModificationInfos modificationInfos) {
Expand Down

0 comments on commit 856ce0c

Please sign in to comment.