feat: Add 4 missing related_links tables for ESPI 4.0 compliance (Phase 1)#52
Merged
Merged
Conversation
Add related_links collection tables for entities extending IdentifiedObject: - customer_related_links for Customer entity (line 479-487) - customer_account_related_links for CustomerAccount entity (line 599-607) - electric_power_quality_summary_related_links for ElectricPowerQualitySummary (line 668-676) - meter_related_links for Meter entity (line 795-803) Each table follows existing pattern: - FK constraint to parent entity with ON DELETE CASCADE - Index on parent FK column for performance - VARCHAR(1024) for related_links URLs Part of ESPI 4.0 schema compliance remediation (Phase 1). All entities extend IdentifiedObject and support Atom <link rel="related"> elements. Migration tested successfully with H2 in-memory database. Includes documentation: - SCHEMA_COMPLIANCE_AUDIT_RESULTS.md: Comprehensive 11-phase remediation plan - SCHEMA_COMPLIANCE_REMEDIATION_PLAN.md: Original analysis and plan - FLYWAY_SCHEMA_SUMMARY.md: Complete Flyway table documentation - MULTI_PHASE_PLAN_UPDATES.md: Phase planning notes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 4 missing related_links tables to the V3 Flyway migration script for entities extending
IdentifiedObjectin the ESPI 4.0 schema.This is Phase 1 of the ESPI 4.0 schema compliance remediation plan (see
SCHEMA_COMPLIANCE_AUDIT_RESULTS.md).Tables Added
All tables follow the existing pattern with FK constraints and indexes:
customer_related_links (line 479-487)
Customerentity from customer.xsdcustomerstable with ON DELETE CASCADEcustomer_account_related_links (line 599-607)
CustomerAccountentity from customer.xsdcustomer_accountstable with ON DELETE CASCADEelectric_power_quality_summary_related_links (line 668-676)
ElectricPowerQualitySummaryentity from usage.xsdelectric_power_quality_summariestable with ON DELETE CASCADEmeter_related_links (line 795-803)
Meterentity from customer.xsdmeterstable with ON DELETE CASCADEDocumentation Included
Technical Details
<link rel="related">URLs (VARCHAR(1024))Test Plan
Next Steps
After this PR is merged:
Related Issues
Part of ESPI 4.0 schema compliance initiative. Addresses missing related_links tables identified in XSD schema audit.
🤖 Generated with Claude Code