Skip to content

Commit

Permalink
code review remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
ghazwarhili committed Dec 6, 2024
1 parent a7bc934 commit f83ee76
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
@Getter
@Entity
@Table(name = "lccConverterStationCreation")
@PrimaryKeyJoinColumn(foreignKey = @ForeignKey(name = "lcc_converter_station_creation_id_fk_constraint"))
public class LccConverterStationCreationEntity extends InjectionCreationEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
Expand All @@ -41,7 +42,8 @@ public class LccConverterStationCreationEntity extends InjectionCreationEntity {
private Float powerFactor;

@ElementCollection
@CollectionTable(name = "shunt_compensator_on_side")
@CollectionTable(name = "shunt_compensator_on_side",
foreignKey = @ForeignKey(name = "lcc_converter_station_creation_shunt_compensators_on_side_fk"))
private List<ShuntCompensatorCreationEmbeddable> shuntCompensatorsOnSide;

public LccConverterStationCreationEntity(LccConverterStationCreationInfos converterStationCreationInfos) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
@Getter
@Entity
@Table(name = "lccCreation")
@PrimaryKeyJoinColumn(foreignKey = @ForeignKey(name = "lcc_creation_id_fk_constraint"))
public class LccCreationEntity extends EquipmentCreationEntity {
@Column
private Double nominalV;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?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="rehiligha (generated)" id="1732713649731-31">
<changeSet author="rehiligha (generated)" id="1733488784779-31">
<createTable tableName="lcc_converter_station_creation">
<column name="equipment_id" type="VARCHAR(255)"/>
<column name="equipment_name" type="VARCHAR(255)"/>
Expand All @@ -17,7 +17,7 @@
</column>
</createTable>
</changeSet>
<changeSet author="rehiligha (generated)" id="1732713649731-32">
<changeSet author="rehiligha (generated)" id="1733488784779-32">
<createTable tableName="lcc_creation">
<column name="equipment_id" type="VARCHAR(255)"/>
<column name="equipment_name" type="VARCHAR(255)"/>
Expand All @@ -33,36 +33,36 @@
<column name="lcc_converter_station_2_id" type="UUID"/>
</createTable>
</changeSet>
<changeSet author="rehiligha (generated)" id="1732713649731-33">
<changeSet author="rehiligha (generated)" id="1733488784779-33">
<createTable tableName="shunt_compensator_on_side">
<column name="lcc_converter_station_creation_entity_id" type="UUID">
<constraints nullable="false"/>
</column>
<column name="connected_to_hvdc" type="BOOLEAN"/>
<column name="maxqat_nominalv" type="FLOAT(53)"/>
<column name="shunt_compensator_id" type="VARCHAR(255)"/>
<column name="maxqat_nominalv" type="FLOAT(53)"/>
<column name="shunt_compensator_name" type="VARCHAR(255)"/>
</createTable>
</changeSet>
<changeSet author="rehiligha (generated)" id="1732713649731-35">
<addUniqueConstraint columnNames="lcc_converter_station_1_id" constraintName="lcc_converter_station_1_id_fk" tableName="lcc_creation"/>
<changeSet author="rehiligha (generated)" id="1733488784779-35">
<addUniqueConstraint columnNames="lcc_converter_station_1_id" constraintName="uc_lcc_converter_station_1_id_col" tableName="lcc_creation"/>
</changeSet>
<changeSet author="rehiligha (generated)" id="1732713649731-36">
<addUniqueConstraint columnNames="lcc_converter_station_2_id" constraintName="lcc_converter_station_2_id_fk" tableName="lcc_creation"/>
<changeSet author="rehiligha (generated)" id="1733488784779-36">
<addUniqueConstraint columnNames="lcc_converter_station_2_id" constraintName="uc_lcc_converter_station_2_id_col" tableName="lcc_creation"/>
</changeSet>
<changeSet author="rehiligha (generated)" id="1732713649731-51">
<addForeignKeyConstraint baseColumnNames="id" baseTableName="lcc_creation" constraintName="lcc_creation_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="modification" validate="true"/>
<changeSet author="rehiligha (generated)" id="1733488784779-56">
<addForeignKeyConstraint baseColumnNames="lcc_converter_station_1_id" baseTableName="lcc_creation" constraintName="lcc_converter_station_1_id_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="lcc_converter_station_creation" validate="true"/>
</changeSet>
<changeSet author="rehiligha (generated)" id="1732713649731-52">
<addForeignKeyConstraint baseColumnNames="lcc_converter_station_creation_entity_id" baseTableName="shunt_compensator_on_side" constraintName="lcc_converter_station_creation_entity_id_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="lcc_converter_station_creation" validate="true"/>
<changeSet author="rehiligha (generated)" id="1733488784779-57">
<addForeignKeyConstraint baseColumnNames="lcc_converter_station_2_id" baseTableName="lcc_creation" constraintName="lcc_converter_station_2_id_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="lcc_converter_station_creation" validate="true"/>
</changeSet>
<changeSet author="rehiligha (generated)" id="1732713649731-53">
<addForeignKeyConstraint baseColumnNames="id" baseTableName="lcc_converter_station_creation" constraintName="lcc_converter_station_creation_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="modification" validate="true"/>
<changeSet author="rehiligha (generated)" id="1733488784779-58">
<addForeignKeyConstraint baseColumnNames="id" baseTableName="lcc_converter_station_creation" constraintName="lcc_converter_station_creation_id_fk_constraint" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="modification" validate="true"/>
</changeSet>
<changeSet author="rehiligha (generated)" id="1732713649731-59">
<addForeignKeyConstraint baseColumnNames="lcc_converter_station_1_id" baseTableName="lcc_creation" constraintName="lcc_converter_station_1_id_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="lcc_converter_station_creation" validate="true"/>
<changeSet author="rehiligha (generated)" id="1733488784779-59">
<addForeignKeyConstraint baseColumnNames="lcc_converter_station_creation_entity_id" baseTableName="shunt_compensator_on_side" constraintName="lcc_converter_station_creation_shunt_compensators_on_side_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="lcc_converter_station_creation" validate="true"/>
</changeSet>
<changeSet author="rehiligha (generated)" id="1732713649731-60">
<addForeignKeyConstraint baseColumnNames="lcc_converter_station_2_id" baseTableName="lcc_creation" constraintName="lcc_converter_station_2_id_fk" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="lcc_converter_station_creation" validate="true"/>
<changeSet author="rehiligha (generated)" id="1733488784779-60">
<addForeignKeyConstraint baseColumnNames="id" baseTableName="lcc_creation" constraintName="lcc_creation_id_fk_constraint" deferrable="false" initiallyDeferred="false" referencedColumnNames="id" referencedTableName="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 @@ -320,4 +320,4 @@ databaseChangeLog:
file: changesets/changelog_20241015T130742Z.xml
- include:
relativeToChangelogFile: true
file: changesets/changelog_20241127T132034Z.xml
file: changesets/changelog_20241206T123930Z.xml

0 comments on commit f83ee76

Please sign in to comment.