Skip to content
Open
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 pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<groupId>org.gridsuite</groupId>
<artifactId>gridsuite-network-modification-server</artifactId>
<version>2.36.0-SNAPSHOT</version>
<version>2.35.0-SNAPSHOT</version>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Potentially accidental project version rollback

Line 24 sets the module version to 2.35.0-SNAPSHOT, which appears unrelated to this indexing PR and can disrupt expected snapshot progression if unintended. Please confirm or revert.

Suggested correction
-    <version>2.35.0-SNAPSHOT</version>
+    <version>2.36.0-SNAPSHOT</version>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<version>2.35.0-SNAPSHOT</version>
<version>2.36.0-SNAPSHOT</version>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pom.xml` at line 24, The pom.xml's <version> element was changed to
"2.35.0-SNAPSHOT" which looks like an accidental rollback unrelated to this
indexing PR; either confirm this version bump is intentional or revert the
<version> value to the previous snapshot/release value used before the change
(restore the prior version string), and if intentional, add a short commit
message or PR note explaining why the module version was modified.


<packaging>jar</packaging>
<name>Network modification server</name>
Expand Down Expand Up @@ -54,6 +54,7 @@
<sonar.projectKey>org.gridsuite:network-modification-server</sonar.projectKey>
<!-- TODO network-modification.version remove when included in gridsuite-dependencies -->
<network-modification.version>0.83.0</network-modification.version>
<liquibase.version>4.31.1</liquibase.version>
</properties>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@AllArgsConstructor
@SuperBuilder
@Entity
@Table(name = "limits_for_line_type")
@Table(name = "limits_for_line_type", indexes = {@Index(name = "limits_for_line_type_idx", columnList = "line_type_id")})
public class LimitsForLineTypeEntity {

@Id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class ConverterStationCreationEntity extends InjectionCreationEntity {
private Double voltageSetpoint;

@ElementCollection
@CollectionTable(name = "converter_station_creation_rcc_points")
@CollectionTable(name = "converter_station_creation_rcc_points", indexes = @Index(name = "converter_station_creation_rcc_points_entity_id_idx", columnList = "converter_station_creation_entity_id"))
private List<ReactiveCapabilityCurveCreationEmbeddable> reactiveCapabilityCurvePoints;

@Column
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class CreateVoltageLevelTopologyEntity extends ModificationEntity {
private Integer sectionCount;

@ElementCollection
@CollectionTable(name = "create_voltage_level_topology_switch_kinds",
@CollectionTable(name = "create_voltage_level_topology_switch_kinds", indexes = @Index(name = "create_voltage_level_topology_switch_kinds_entity_id_idx", columnList = "create_voltage_level_topology_id"),
joinColumns = @JoinColumn(name = "create_voltage_level_topology_id", foreignKey = @ForeignKey(name = "create_voltage_level_topology_switch_kinds")))
private List<String> switchKinds;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class LccConverterStationCreationEntity extends InjectionCreationEntity {
private Float powerFactor;

@ElementCollection
@CollectionTable(name = "shunt_compensator_on_side",
@CollectionTable(name = "shunt_compensator_on_side", indexes = {@Index(name = "shunt_compensator_on_side_index", columnList = "lcc_converter_station_creation_entity_id")},
foreignKey = @ForeignKey(name = "lcc_converter_station_creation_shunt_compensators_on_side_fk"))
private List<ShuntCompensatorCreationEmbeddable> shuntCompensatorsOnSide;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class ByFilterDeletionEntity extends ModificationEntity {
@JoinTable(
name = "byFilterDeletionFilters",
joinColumns = @JoinColumn(name = "id"), foreignKey = @ForeignKey(name = "by_filter_deletion_id_fk"),
indexes = @Index(name = "by_filter_deletion_filters_id_idx", columnList = "id"),
inverseJoinColumns = @JoinColumn(name = "filterId"), inverseForeignKey = @ForeignKey(name = "variation_filter_id_fk"))
private List<VariationFilterEntity> filters;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class ConverterStationModificationEntity extends InjectionModificationEnt
private DoubleModificationEmbedded voltageSetpoint;

@ElementCollection
@CollectionTable(name = "converter_station_modification_rcc_points")
@CollectionTable(name = "converter_station_modification_rcc_points", indexes = @Index(name = "converter_station_modification_rcc_points_entity_id_idx", columnList = "converter_station_modification_entity_id"))
private List<ReactiveCapabilityCurveModificationEmbeddable> reactiveCapabilityCurvePoints;

@Embedded
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public class LccConverterStationModificationEntity extends InjectionModification
private FloatModificationEmbedded powerFactor;

@ElementCollection
@CollectionTable(name = "lcc_converter_station_modification_on_side", joinColumns = @JoinColumn(name = "lcc_converter_station_modification_id"),
foreignKey = @ForeignKey(name = "lcc_converter_station_modification_on_side_fk"))
@CollectionTable(name = "lcc_converter_station_modification_on_side", indexes = {@Index(name = "lcc_converter_station_modification_on_side_index", columnList = "lcc_converter_station_modification_id")},
joinColumns = @JoinColumn(name = "lcc_converter_station_modification_id"), foreignKey = @ForeignKey(name = "lcc_converter_station_modification_on_side_fk"))
private List<ShuntCompensatorModificationEmbeddable> shuntCompensatorsOnSide;

public LccConverterStationModificationEntity(LccConverterStationModificationInfos converterStationModificationInfos) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "limits_property")
@Table(name = "limits_property",
indexes = {@Index(name = "limits_property_modification_operational_limit_group_id_idx", columnList = "operational_limit_group_id")})
public class LimitsPropertyEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class MoveVoltageLevelFeederBaysEntity extends ModificationEntity {

@ElementCollection
@CollectionTable(
name = "move_feeder_bay",
name = "move_feeder_bay", indexes = {@Index(name = "move_feeder_bay_modification_idx", columnList = "modification_id")},
joinColumns = @JoinColumn(name = "modification_id"),
foreignKey = @ForeignKey(name = "move_feeder_bay_modification_id_fk_constraint")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;

import java.util.UUID;

/**
Expand All @@ -28,7 +29,9 @@
@Getter
@Setter
@Entity
@Table(name = "VariationFilter", indexes = @Index(name = "formula_id_idx", columnList = "formula_id"))
@Table(name = "VariationFilter", indexes = {
@Index(name = "formula_id_idx", columnList = "formula_id"),
@Index(name = "variation_filter_assignment_id_idx", columnList = "assignment_id")})
public class VariationFilterEntity {

@Id
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?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="lesoteti (generated)" id="1779460567128-3">
<createIndex indexName="VariationFilter_assignment_id_idx" tableName="variation_filter">
<column name="assignment_id"/>
</createIndex>
</changeSet>
<changeSet author="lesoteti (generated)" id="1779460567128-4">
<createIndex indexName="by_filter_deletion_filters_id_idx" tableName="by_filter_deletion_filters">
<column name="id"/>
</createIndex>
</changeSet>
<changeSet author="lesoteti (generated)" id="1779460567128-5">
<createIndex indexName="converter_station_creation_rcc_points_entity_id_idx" tableName="converter_station_creation_rcc_points">
<column name="converter_station_creation_entity_id"/>
</createIndex>
</changeSet>
<changeSet author="lesoteti (generated)" id="1779460567128-6">
<createIndex indexName="converter_station_modification_rcc_points_entity_id_idx" tableName="converter_station_modification_rcc_points">
<column name="converter_station_modification_entity_id"/>
</createIndex>
</changeSet>
<changeSet author="lesoteti (generated)" id="1779460567128-7">
<createIndex indexName="create_voltage_level_topology_switch_kinds_entity_id_idx" tableName="create_voltage_level_topology_switch_kinds">
<column name="create_voltage_level_topology_id"/>
</createIndex>
</changeSet>
<changeSet author="lesoteti (generated)" id="1779460567128-8">
<createIndex indexName="lcc_converter_station_modification_on_side_index" tableName="lcc_converter_station_modification_on_side">
<column name="lcc_converter_station_modification_id"/>
</createIndex>
</changeSet>
<changeSet author="lesoteti (generated)" id="1779460567128-9">
<createIndex indexName="limits_for_line_type_idx" tableName="limits_for_line_type">
<column name="line_type_id"/>
</createIndex>
</changeSet>
<changeSet author="lesoteti (generated)" id="1779460567128-11">
<createIndex indexName="move_feeder_bay_modification_idx" tableName="move_feeder_bay">
<column name="modification_id"/>
</createIndex>
</changeSet>
<changeSet author="lesoteti (generated)" id="1779460567128-12">
<createIndex indexName="shunt_compensator_on_side_index" tableName="shunt_compensator_on_side">
<column name="lcc_converter_station_creation_entity_id"/>
</createIndex>
</changeSet>
</databaseChangeLog>
3 changes: 3 additions & 0 deletions src/main/resources/db/changelog/db.changelog-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -486,3 +486,6 @@ databaseChangeLog:
- include:
file: changesets/changelog_20260522T132309Z.xml
relativeToChangelogFile: true
- include:
file: changesets/changelog_20260522T143544Z.xml
relativeToChangelogFile: true
Loading