Skip to content

Conversation

@tianzhou
Copy link
Contributor

@tianzhou tianzhou commented Nov 7, 2025

Fix #144

Copilot AI review requested due to automatic review settings November 7, 2025 11: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 enhances type qualification for PostgreSQL extension types, custom domains, and enums when they reside in schemas other than the target schema. It addresses GitHub issue #144 and implements the fix in PR #145.

Key Changes

  • Added base type (typtype = 'b') handling in SQL queries to properly qualify extension types like hstore and citext when they're in external schemas
  • Modified test infrastructure to execute setup.sql directly to databases instead of concatenating SQL strings
  • Updated test cases to use extension types from a utils schema to verify cross-schema type qualification

Reviewed Changes

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

Show a summary per file
File Description
ir/queries/queries.sql.go Added base type handling to qualify extension types from external schemas
testdata/diff/create_table/add_column_custom_type/setup.sql Updated test setup to create extension types and custom types in utils schema
testdata/diff/create_table/add_column_custom_type/new.sql Modified to use qualified type names from utils schema
testdata/diff/create_table/add_column_custom_type/plan.txt Updated expected plan to reflect qualified type names
testdata/diff/create_table/add_column_custom_type/plan.sql Updated expected DDL with qualified type references
testdata/diff/create_table/add_column_custom_type/plan.json Updated JSON plan with new column definitions and qualified types
testdata/diff/create_table/add_column_custom_type/diff.sql Updated expected diff output with qualified type names
internal/diff/diff_test.go Changed setup handling to execute SQL directly instead of string concatenation
cmd/migrate_integration_test.go Updated to execute setup.sql to both target and embedded databases

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

@tianzhou tianzhou force-pushed the extension_qualifier branch from 506788e to 2eaa03e Compare November 7, 2025 11:17
@tianzhou tianzhou merged commit 52fef4c into main Nov 7, 2025
2 checks passed
@tianzhou tianzhou deleted the extension_qualifier branch November 23, 2025 14:51
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