Skip to content
Draft
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ target/
/.idea
*.iml

derby.log
# https://github.com/liquibase/liquibase/issues/2196
/derby.log
4 changes: 1 addition & 3 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (c) 2020, RTE (http://www.rte-france.com)
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
Expand All @@ -15,7 +13,7 @@
<parent>
<groupId>com.powsybl</groupId>
<artifactId>powsybl-parent-ws</artifactId>
<version>17</version>
<version>18</version>
<relativePath/>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,46 @@
<changeSet author="hedhiliabd" id="1689623201842-1">
<validCheckSum>8:7fd14e032dc177e25b1cedbb4b9b861f</validCheckSum>
<modifyDataType columnName="connection_direction"
newDataType="tinyint"
newDataType="smallint"
tableName="battery_creation"/>
<modifyDataType columnName="connection_direction"
newDataType="tinyint"
newDataType="smallint"
tableName="converter_station_creation"/>
<modifyDataType columnName="converters_mode"
newDataType="tinyint"
newDataType="smallint"
tableName="vsc_creation"/>
<modifyDataType columnName="connection_direction"
newDataType="tinyint"
newDataType="smallint"
tableName="generator_creation"/>
<modifyDataType columnName="energy_source"
newDataType="tinyint"
newDataType="smallint"
tableName="generator_creation"/>
<modifyDataType columnName="connection_direction"
newDataType="tinyint"
newDataType="smallint"
tableName="battery_creation"/>
<modifyDataType columnName="connection_direction1"
newDataType="tinyint"
newDataType="smallint"
tableName="line_creation"/>
<modifyDataType columnName="connection_direction2"
newDataType="tinyint"
newDataType="smallint"
tableName="line_creation"/>
<modifyDataType columnName="connection_direction"
newDataType="tinyint"
newDataType="smallint"
tableName="load_creation"/>
<modifyDataType columnName="load_type_value"
newDataType="tinyint"
newDataType="smallint"
tableName="load_modification"/>
<modifyDataType columnName="load_type"
newDataType="tinyint"
newDataType="smallint"
tableName="load_creation"/>
<modifyDataType columnName="reactive_variation_mode"
newDataType="tinyint"
newDataType="smallint"
tableName="scaling_variation"/>
<modifyDataType columnName="connection_direction"
newDataType="tinyint"
newDataType="smallint"
tableName="shunt_compensator_creation_entity"/>
<modifyDataType columnName="shunt_compensator_type"
newDataType="tinyint"
newDataType="smallint"
tableName="shunt_compensator_creation_entity"/>
<modifyDataType columnName="country"
newDataType="smallint"
Expand All @@ -51,13 +51,13 @@
newDataType="smallint"
tableName="substation_modification"/>
<modifyDataType columnName="connection_direction2"
newDataType="tinyint"
newDataType="smallint"
tableName="two_windings_transformer_creation"/>
<modifyDataType columnName="connection_direction1"
newDataType="tinyint"
newDataType="smallint"
tableName="two_windings_transformer_creation"/>
<modifyDataType columnName="switch_kinds"
newDataType="tinyint"
newDataType="smallint"
tableName="voltage_level_creation_entity_switch_kinds"/>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?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="chuinetri (base generated)" id="1697559360565-1">
<dropDefaultValue columnDataType="int" columnName="pos_generators_frequency" tableName="generation_dispatch_generators_frequency_reserve"/>
<dropDefaultValue columnDataType="int" columnName="pos_generators_frequency" tableName="generation_dispatch_generators_frequency_reserve"/>
<dropDefaultValue columnDataType="boolean" columnName="stashed" tableName="modification"/>
<dropDefaultValue columnDataType="boolean" columnName="stashed" tableName="modification"/>
</changeSet>

<!--<changeSet author="chuinetri (base generated)" id="1697559360565-2">
<dropUniqueConstraint constraintName="uc_line_attach_to_voltage_levelline_creation_id_col" tableName="line_attach_to_voltage_level"/>
<dropUniqueConstraint constraintName="uc_line_attach_to_voltage_levelmay_voltage_level_creation_id_col" tableName="line_attach_to_voltage_level"/>
<dropUniqueConstraint constraintName="uc_line_creationcurrent_limits_id2_col" tableName="line_creation"/>
<dropUniqueConstraint constraintName="uc_line_creationcurrent_limits_id1_col" tableName="line_creation"/>
<dropUniqueConstraint constraintName="uc_line_modificationcurrent_limits_modification_id2_col" tableName="line_modification"/>
<dropUniqueConstraint constraintName="uc_line_modificationcurrent_limits_modification_id1_col" tableName="line_modification"/>
<dropUniqueConstraint constraintName="uc_line_split_with_voltage_levelmay_voltage_level_creation_id_c" tableName="line_split_with_voltage_level"/>
<dropUniqueConstraint constraintName="uc_two_windings_transformer_creationcurrent_limits_id2_col" tableName="two_windings_transformer_creation"/>
<dropUniqueConstraint constraintName="uc_two_windings_transformer_creationcurrent_limits_id1_col" tableName="two_windings_transformer_creation"/>
<dropUniqueConstraint constraintName="uc_vsc_creationconverter_station_1_id_col" tableName="vsc_creation"/>
<dropUniqueConstraint constraintName="uc_vsc_creationconverter_station_2_id_col" tableName="vsc_creation"/>
</changeSet>-->
<changeSet author="chuinetri (base generated)" id="1697559360565-3">
<addUniqueConstraint columnNames="line_creation_id" constraintName="uc_line_attach_to_voltage_levelline_creation_id_col" tableName="line_attach_to_voltage_level"/>
<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"/>
<addUniqueConstraint columnNames="current_limits_id2" constraintName="uc_line_creationcurrent_limits_id2_col" tableName="line_creation"/>
<addUniqueConstraint columnNames="current_limits_id1" constraintName="uc_line_creationcurrent_limits_id1_col" tableName="line_creation"/>
<addUniqueConstraint columnNames="current_limits_modification_id2" constraintName="uc_line_modificationcurrent_limits_modification_id2_col" tableName="line_modification"/>
<addUniqueConstraint columnNames="current_limits_modification_id1" constraintName="uc_line_modificationcurrent_limits_modification_id1_col" tableName="line_modification"/>
<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"/>
<addUniqueConstraint columnNames="current_limits_id2" constraintName="uc_two_windings_transformer_creationcurrent_limits_id2_col" tableName="two_windings_transformer_creation"/>
<addUniqueConstraint columnNames="current_limits_id1" constraintName="uc_two_windings_transformer_creationcurrent_limits_id1_col" tableName="two_windings_transformer_creation"/>
<addUniqueConstraint columnNames="converter_station_1_id" constraintName="uc_vsc_creationconverter_station_1_id_col" tableName="vsc_creation"/>
<addUniqueConstraint columnNames="converter_station_2_id" constraintName="uc_vsc_creationconverter_station_2_id_col" tableName="vsc_creation"/>
</changeSet>

<changeSet author="chuinetri (base generated)" id="1697559360565-4">
<addUniqueConstraint columnNames="additional_equipment_deletion_entity_id" constraintName="uc_equipment_deletionAdditional_equipment_deletion_entity_id_col" tableName="equipment_deletion"/>
<addUniqueConstraint columnNames="current_limits_modification_id1" constraintName="uc_two_windings_transformer_modificationCurrent_limits_modifica" tableName="two_windings_transformer_modification"/>
</changeSet>

<changeSet author="chuinetri (base generated)" id="1697559360565-5">
<addForeignKeyConstraint baseColumnNames="id" baseTableName="battery_creation" constraintName="batteryCreation_id_fk_constraint" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="modification" validate="true"/>

<!-- if try to drop beforehand "Constraint "CURRENT_LIMITS_MODIFICATION_ID1_FK" not found"
and if try to add "Constraint "CURRENT_LIMITS_MODIFICATION_ID1_FK" already exists" ... -->
<!--<addForeignKeyConstraint baseColumnNames="current_limits_modification_id1" baseTableName="two_windings_transformer_modification" constraintName="current_limits_modification_id1_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="current_limits_modification" validate="true"/>
<addForeignKeyConstraint baseColumnNames="current_limits_modification_id2" baseTableName="two_windings_transformer_modification" constraintName="current_limits_modification_id2_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="current_limits_modification" validate="true"/>-->
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?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="chuinetri (generated)" id="1697564818890-9">
<addForeignKeyConstraint baseColumnNames="current_limits_modification_id1" baseTableName="two_windings_transformer_modification" constraintName="current_limits_modification_id1_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="current_limits_modification" validate="true"/>
</changeSet>
<changeSet author="chuinetri (generated)" id="1697564818890-10">
<addForeignKeyConstraint baseColumnNames="current_limits_modification_id2" baseTableName="two_windings_transformer_modification" constraintName="current_limits_modification_id2_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="current_limits_modification" validate="true"/>
</changeSet>
<changeSet author="chuinetri (generated)" id="1697564818890-1">
<dropUniqueConstraint constraintName="UC_LINE_CREATIONCURRENT_LIMITS_ID1_COL" tableName="line_creation"/>
</changeSet>
<changeSet author="chuinetri (generated)" id="1697564818890-2">
<addUniqueConstraint columnNames="current_limits_id1" constraintName="UC_LINE_CREATIONCURRENT_LIMITS_ID1_COL" tableName="line_creation"/>
</changeSet>
<changeSet author="chuinetri (generated)" id="1697564818890-3">
<dropUniqueConstraint constraintName="UC_LINE_SPLIT_WITH_VOLTAGE_LEVELMAY_VOLTAGE_LEVEL_CREATION_ID_C" tableName="line_split_with_voltage_level"/>
</changeSet>
<changeSet author="chuinetri (generated)" id="1697564818890-4">
<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="chuinetri (generated)" id="1697564818890-5">
<dropUniqueConstraint constraintName="UC_VSC_CREATIONCONVERTER_STATION_2_ID_COL" tableName="vsc_creation"/>
</changeSet>
<changeSet author="chuinetri (generated)" id="1697564818890-6">
<addUniqueConstraint columnNames="converter_station_2_id" constraintName="UC_VSC_CREATIONCONVERTER_STATION_2_ID_COL" tableName="vsc_creation"/>
</changeSet>
<changeSet author="chuinetri (generated)" id="1697564818890-7">
<dropUniqueConstraint constraintName="UC_VSC_CREATIONCONVERTER_STATION_1_ID_COL" tableName="vsc_creation"/>
</changeSet>
<changeSet author="chuinetri (generated)" id="1697564818890-8">
<addUniqueConstraint columnNames="converter_station_1_id" constraintName="UC_VSC_CREATIONCONVERTER_STATION_1_ID_COL" tableName="vsc_creation"/>
</changeSet>
</databaseChangeLog>
4 changes: 3 additions & 1 deletion src/main/resources/db/changelog/db.changelog-master.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
databaseChangeLog:

- include:
file: changesets/changelog_20211019T140751Z.xml
relativeToChangelogFile: true
Expand Down Expand Up @@ -201,3 +200,6 @@ databaseChangeLog:
- include:
file: changesets/changelog_20230801T194601Z.xml
relativeToChangelogFile: true
- include:
file: changesets/changelog_20231017T161521Z.xml
relativeToChangelogFile: true
2 changes: 1 addition & 1 deletion src/test/resources/application-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gridsuite:
powsybl-ws:
database:
vendor: h2:mem
query: ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
query: ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=PostgreSQL;DEFAULT_NULL_ORDERING=HIGH
hostPort: ":"


Expand Down