-
Notifications
You must be signed in to change notification settings - Fork 263
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
Missing Schema Prefix in DDL RENAME
Statement
#3006
Comments
Hey @mpyw, what URL did you use? See: https://atlasgo.io/concepts/url#scope Also, please upgrade to latest Atlas and check this. |
From docs:
Closing, but feel free to reopen if you still need help with this. |
@a8m The database URL is |
I'll reopen as a new issue. |
Description
When using the Atlas HCL migration tool to rename an index from "a" to "b", the generated DDL statement for the
RENAME
operation lacks the schema name prefix. This causes apq: relation not found
error when working with schemas other thanpublic
in PostgreSQL.Steps to Reproduce
public
in PostgreSQL (e.g.,custom_schema
).a
in this custom schema.a
tob
.RENAME
operation.Expected Behavior
The generated DDL statement should include the schema name prefix for the index being renamed. For example:
Actual Behavior
The generated DDL statement lacks the schema name prefix, resulting in an error:
Environment
v0.24.1-6857ea8-canary
public.ecr.aws/docker/library/postgres:15.4
Additional Context
This issue appears when working with schemas other than
public
in PostgreSQL. The lack of a schema name prefix in theRENAME
statement causes PostgreSQL to search for the index in thepublic
schema, leading to a relation not found error if the index is in a different schema.The text was updated successfully, but these errors were encountered: