Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR splits materialized view handling from regular view handling, introducing distinct diff types for materialized views and their associated operations. The change provides better type safety and clearer differentiation between regular views and materialized views in migration plans and dump output.
- Introduces new diff types for materialized views (
DiffTypeMaterializedView,DiffTypeMaterializedViewComment, etc.) - Updates test data files to reflect the separation of materialized views from regular views in plan output
- Modifies plan formatting to handle materialized views as a separate category with their own section
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| testdata files | Update expected plan output to show materialized views separately from regular views |
| internal/plan/rewrite.go | Update parameter names and logic to handle materialized view indexes separately |
| internal/plan/plan.go | Add materialized view types and implement separate tracking/formatting for materialized views |
| internal/dump/formatter.go | Update directory structure and formatting to handle materialized views separately |
| internal/diff/view.go | Refactor view creation/modification logic to use appropriate diff types based on materialization |
| internal/diff/index.go | Remove deprecated function for view indexes |
| internal/diff/diff.go | Add new diff types for materialized views and update string mappings |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
internal/plan/plan.go
Outdated
| // Track materialized views that have sub-resource changes | ||
| materializedViewsWithSubResources := make(map[string]bool) // materialized_view_path -> true | ||
|
|
||
| // Track non-table/non-view operations |
There was a problem hiding this comment.
The comment should be updated to reflect that materialized views are now tracked separately: 'Track non-table/non-view/non-materialized-view operations'
| // Track non-table/non-view operations | |
| // Track non-table/non-view/non-materialized-view operations |
internal/plan/plan.go
Outdated
| summary.ByType["materialized views"] = stats | ||
| } | ||
|
|
||
| // Count non-table/non-view operations (each operation counted individually) |
There was a problem hiding this comment.
This comment should be updated to reflect that materialized views are now handled separately: 'Count non-table/non-view/non-materialized-view operations'
| // Count non-table/non-view operations (each operation counted individually) | |
| // Count non-table/non-view/non-materialized-view operations (each operation counted individually) |
591b5fd to
5696daf
Compare
No description provided.