Skip to content

Commit

Permalink
Fix Postgres migration when schema is not public. (#6340)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriennesox authored Oct 3, 2024
1 parent 819ca04 commit 40bdab0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private String generatePrimaryKeyNameSql() {
return null; // Irrelevant: We don't need to run the SQL for these databases.
case POSTGRES_9_4:
return "SELECT constraint_name " + "FROM information_schema.table_constraints "
+ "WHERE table_schema = 'public' "
+ "WHERE table_schema = coalesce(current_schema(), 'public') "
+ "AND constraint_type = 'PRIMARY KEY' "
+ "AND table_name = ?";
case ORACLE_12C:
Expand Down

0 comments on commit 40bdab0

Please sign in to comment.