-
Notifications
You must be signed in to change notification settings - Fork 29
Revert "fix: extension qualifier (#146)" #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| ALTER TABLE users ADD COLUMN email citext NOT NULL; | ||
| ALTER TABLE users ADD COLUMN description public.custom_text; | ||
| ALTER TABLE users ADD COLUMN status public.status_enum DEFAULT 'active'; | ||
| ALTER TABLE users ADD COLUMN email email_address NOT NULL; | ||
|
|
||
| ALTER TABLE users ADD COLUMN status user_status DEFAULT 'active' NOT NULL; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,18 +1,13 @@ | ||||||
| -- New state: Add columns using extension type, custom domain, and enum | ||||||
| -- Types are created via setup.sql | ||||||
| -- This tests GitHub #144 fix and PR #145 functionality: | ||||||
| -- - Extension types (citext) should be unqualified | ||||||
| -- - Custom domains (custom_text) should be schema-qualified | ||||||
| -- - Enums (status_enum) should be schema-qualified | ||||||
| -- New state: Add columns using custom types from setup.sql | ||||||
| -- Types (email_address, user_status) are created in setup.sql | ||||||
| -- Use unqualified names - types will be resolved via setup.sql context | ||||||
|
||||||
| -- Use unqualified names - types will be resolved via setup.sql context | |
| -- Unqualified names are used because the types' schema matches the table's schema (public) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| ALTER TABLE users ADD COLUMN email citext NOT NULL; | ||
| ALTER TABLE users ADD COLUMN email email_address NOT NULL; | ||
|
|
||
| ALTER TABLE users ADD COLUMN description public.custom_text; | ||
|
|
||
| ALTER TABLE users ADD COLUMN status public.status_enum DEFAULT 'active'; | ||
| ALTER TABLE users ADD COLUMN status user_status DEFAULT 'active' NOT NULL; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,10 +1,14 @@ | ||||||
| -- Setup: Create extension type, custom domain, and enum to test type qualification | ||||||
| -- This reproduces GitHub #144 and validates PR #145 fixes | ||||||
| -- Extension types (citext) should be unqualified (search_path resolution) | ||||||
| -- Custom domains and enums should be schema-qualified (public.*) | ||||||
| -- Setup: Create types in public schema | ||||||
| -- This simulates extension types like citext installed in public schema | ||||||
|
||||||
| -- This simulates extension types like citext installed in public schema | |
| -- These are regular user-defined types (composite and enum) created in the public schema to test schema-based qualification logic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The base type qualification logic (typtype = 'b') is missing from the generated code in queries.sql.go. The generated file still uses the old single CASE statement for domains, enums, and composite types but doesn't include the base type handling. This inconsistency could lead to incorrect type qualification for base types.