KamoCRM

Drop stale CHECK constraints on default-role-rights enum columns

FixInitializerService
Shipped
20 ஏப்ரல், 2026 அன்று 8:15 PM UTC
Author
Kamo
Commit
ff8369d

Hibernate auto-generates CHECK (column IN ('VAL1', 'VAL2', ...)) constraints on CREATE TABLE for @Enumerated(EnumType.STRING) columns, freezing the enum's value list at table-creation time. Every subsequent RoleRightType or RoleRightTemplateSettingType addition fails the stale whitelist. @Enumerated already enforces valid values at the Java layer, so the DB-level CHECK is redundant and causes startup-time InsertIfAbsent inserts to fail. Drops check_right_type + check_setting on **************** idempotently.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing