- Ya
- 12 Agosti 2026, 23:58 UTC
- Mwandishi
- Kamo
- Ahadi ya
- d19b3e4
KamoInitializer could not start at all. Hibernate detects CockroachDialect, whose supportsInsertReturning() and **************** are both false, so an @Id carrying @Generated(event=INSERT) — which 29 shared-lib entities took on when PostgreSQL turned out to reject a column with both a DEFAULT and an identity clause — fell through to UniqueKeySelectingDelegate, which needs a @NaturalId to read the key back. None have one, so the SessionFactory refused to build: "entity '...Declarations' has no '@NaturalId' property". Pinning PostgreSQLDialect fixes it, and is not a new idea: it is the database-platform SecurityService and every other service already names against this same database. CockroachDB has always supported INSERT ... RETURNING. The expected consequence is logged where the setting is: ddl-auto now disagrees with a schema CockroachDialect created and emits ~450 no-op "set data type" statements per run, 48 of which CockroachDB rejects. Two consecutive runs produced an identical error profile with the count going UP, which is what shows nothing is being applied. They resolve when the dialect and the database agree. **************** was deleting the index it had just created. CockroachDB surfaces a partial unique index in information_schema as a plain UNIQUE constraint over its columns, with nothing to say it is partial, so the "find the old three-column unique" search matched uk_as_acct_market_org_nogroup — its own replacement. DROP CONSTRAINT failed with "use DROP INDEX CASCADE instead", the fallback did exactly that, and both statements logged "applied". Every run created it and then dropped it, leaving account_subscriptions with no uniqueness on (account, market, org) for ungrouped subscriptions — the outcome the runner's own guard exists to refuse. Excluded by name in the query and again in the drop loop, and the index is back in place.