Skip to content

Conversation

@tianzhou
Copy link
Contributor

@tianzhou tianzhou commented Nov 5, 2025

Fix #144

Copilot AI review requested due to automatic review settings November 5, 2025 11:25
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 handling custom types (like composite types and enums) from non-pg_catalog schemas in column definitions. It enhances type resolution logic to properly qualify base types from non-standard schemas and introduces a test setup mechanism for tests that require pre-existing types.

Key changes:

  • Enhanced SQL queries to handle base types (typtype = 'b') from schemas other than pg_catalog
  • Added setup.sql support to test infrastructure for pre-creating types/schemas before running diff tests
  • Created comprehensive test case for adding columns with custom types

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ir/queries/queries.sql Added logic to qualify base types from non-pg_catalog/non-table schemas
internal/diff/diff_test.go Added parseSQLWithSetup function and setup.sql file handling for tests
cmd/migrate_integration_test.go Extended integration test to support setup.sql execution and temporary file creation
testdata/diff/create_table/add_column_custom_type/* New test case with setup, old, new, and expected output files
.claude/skills/pg_dump/SKILL.md Added new test command to checklist

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tianzhou tianzhou force-pushed the non_primitive_type_qualifier branch from 4f18d32 to 9d38584 Compare November 5, 2025 11:51
@tianzhou tianzhou requested a review from Copilot November 5, 2025 11:51
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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tianzhou tianzhou force-pushed the non_primitive_type_qualifier branch from 9d38584 to 59fe651 Compare November 5, 2025 12:20
@tianzhou tianzhou requested a review from Copilot November 5, 2025 12:23
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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tianzhou tianzhou force-pushed the non_primitive_type_qualifier branch from 59fe651 to cfc8631 Compare November 5, 2025 12:28
@tianzhou tianzhou requested a review from Copilot November 5, 2025 12:31
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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tianzhou tianzhou force-pushed the non_primitive_type_qualifier branch from cfc8631 to 022dc4c Compare November 5, 2025 12:37
@tianzhou tianzhou requested a review from Copilot November 5, 2025 12:38
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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tianzhou tianzhou merged commit b14c571 into main Nov 5, 2025
8 checks passed
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.

non-primitive types should be fully qualified in dumps to avoid planning errors

1 participant