Recognise an existing CHECK constraint through Spring's wrapper

FixInitializerService
Ya
11 Agosti 2026, 23:56 UTC
Mwandishi
Kamo
Ahadi ya
ae42fab

TrainingSchemaMigration @Order(43) has been aborting EVERY KamoInitializer run, silently withholding all 29 runners ordered after it (orders 45-112). Observed in production 2026-08-11. ITEM_TARGET_CHECK_SQL's javadoc promises the duplicate-constraint error is 'caught and treated as success below', and ensureCheckConstraint does try to -- but it tested e.getMessage() only. Spring wraps the driver's PSQLException in a BadSqlGrammarException whose own message is ONLY the offending SQL; the 'constraint ... already exists' text is on the cause. So the check never matched and the runner threw. Fixed by walking the cause chain, exactly as the neighbouring isRetryable already does. Regression test pins the wrapped shape specifically, since the unwrapped one always passed and is what hid this.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei