Skip to content

Commit a866f03

Browse files
dfcoffinclaude
andauthored
fix: correct index mapping in electric_power_quality_summaries table (#44)
Fix incorrect index mapping where idx_epqs_summary_interval_start was indexing the 'id' column instead of the 'summary_interval_start' column. This issue was introduced when uuid columns were removed and replaced with id PRIMARY KEY columns. The index name suggests it should index summary_interval_start, not id. Changes: - V3 migration: Change idx_epqs_summary_interval_start to index summary_interval_start column instead of id column Testing: - All H2 repository tests passing (60+ tests) - Flyway migrations V1, V2, V3 execute successfully - Index now correctly targets summary_interval_start column Fixes issue identified in commit d5e321b where uuid index removal inadvertently created an incorrectly mapped index. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.5 <[email protected]>
1 parent 957c403 commit a866f03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openespi-common/src/main/resources/db/migration/V3__Create_additiional_Base_Tables.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ CREATE TABLE electric_power_quality_summaries
641641
);
642642

643643
CREATE INDEX idx_epqs_usage_point_id ON electric_power_quality_summaries (usage_point_id);
644-
CREATE INDEX idx_epqs_summary_interval_start ON electric_power_quality_summaries (id);
644+
CREATE INDEX idx_epqs_summary_interval_start ON electric_power_quality_summaries (summary_interval_start);
645645
CREATE INDEX idx_epqs_created ON electric_power_quality_summaries (created);
646646
CREATE INDEX idx_epqs_updated ON electric_power_quality_summaries (updated);
647647

0 commit comments

Comments
 (0)