Skip to content

Comments

feat: materialized_view_index#68

Merged
tianzhou merged 1 commit intomainfrom
materialized_view_index
Oct 11, 2025
Merged

feat: materialized_view_index#68
tianzhou merged 1 commit intomainfrom
materialized_view_index

Conversation

@tianzhou
Copy link
Contributor

Fix #66

Copilot AI review requested due to automatic review settings October 11, 2025 15:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for materialized view indexes to pgschema, addressing issue #66. The implementation enables creating, modifying, and dropping indexes on materialized views with both offline and online migration strategies.

Key changes:

  • Extended the View struct to include an Indexes field for materialized views
  • Added index support throughout the parser, differ, and plan generation pipeline
  • Implemented proper categorization and handling of view index operations in migration plans

Reviewed Changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated no comments.

Show a summary per file
File Description
testdata/dump/sakila/pgschema.sql Added sample materialized view index creation
testdata/diff/online/alter_materialized_view_index/* Test data for online index modification scenarios
testdata/diff/online/add_materialized_view_index/* Test data for adding indexes to materialized views
testdata/diff/create_materialized_view/alter_materialized_view/* Updated test to reflect new plan output format
testdata/diff/create_index/drop_index/* Extended test to include view index operations
testdata/diff/comment_on/add_index_comment/* Added materialized view index comment scenarios
ir/parser.go Enhanced parser to handle indexes on materialized views
ir/ir.go Added Indexes field to View struct for materialized views
ir/inspector.go Modified index building to support materialized views
internal/plan/rewrite.go Added view index rewrite support for online operations
internal/plan/plan.go Enhanced plan generation to handle view operations and sub-resources
internal/diff/view.go Implemented view index diffing and SQL generation
internal/diff/index.go Refactored index creation to support both tables and views
internal/diff/diff.go Added new diff types for view indexes and enhanced view diffing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@tianzhou tianzhou merged commit e4d2832 into main Oct 11, 2025
2 checks passed
@tianzhou tianzhou deleted the materialized_view_index branch October 23, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

indexes on materialized views are not dumped

1 participant