Use CockroachDB-compatible DROP INDEX CASCADE syntax

FixInitializerService
Shipped
April 24, 2026 at 11:24 PM UTC
Author
Kamo
Commit
17cf757

CockroachDB rejects ALTER TABLE ... DROP CONSTRAINT for UNIQUE constraints with: unimplemented: cannot drop UNIQUE constraint "uk_org_oauth_provider" using ALTER TABLE DROP CONSTRAINT, use DROP INDEX CASCADE instead Switch the migration to `DROP INDEX IF EXISTS <table>@<index> CASCADE` which CockroachDB accepts. Plain PostgreSQL also accepts the simpler `DROP INDEX IF EXISTS <name> CASCADE` form, so the migration tries both variants for engine portability. Same treatment applied to the legacy uk_voip_provider_config_org_id / **************** safeguards (defensive cleanups in case Hibernate left those constraints behind). Migration is still idempotent and safe to re-run on already-migrated DBs.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing