| Hey, since Postgres 9.2 it is possible to use IF EXISTS in ALTER TABLE statements. Implementing this would get rid of errors when dropping constraints on tables that might not exist (e.g. described in
HHH-5073 Closed ). Although not harmful per se, it spams error-logs and creates false positives in environments where those error-logs are checked and are eventually used for monitoring. The attached patch shows a possible solution where a method getAlterTableString() is introduced on Dialect, overidden in Postgres92Dialect and used throughout the project. This has also the nice side-effect of using "alter table" in less places. Even if the change in Postgres92Dialect might be too risky, introducing getAlterTableString() would still makes sense as it allows people to override this in their own dialects if they want to. Let me know what you think. Would be happy if this is merged. Cheers, Christoph |