Skip to content

[fix]Fixing the bug that causes index migration failure in multi-sche… #231

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion psqlextra/backend/introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def get_constraints(self, cursor, table_name: str):
# standard Django implementation does not return the definition
# for indexes, only for constraints, let's patch that up
cursor.execute(
"SELECT indexname, indexdef FROM pg_indexes WHERE tablename = %s",
"SELECT indexname, indexdef FROM pg_indexes WHERE schemaname = current_schema() AND tablename = %s",
(table_name,),
)
for index_name, definition in cursor.fetchall():
Expand Down