KamoCRM

[11] doc 11 §6.2 single-active enum↔DDL drift guard

Testkamo-shared-library
Shipped
4 ஜூலை, 2026 அன்று 12:26 PM UTC
Author
Kamo
Commit
5fdfbb1

**************** is derived from enum metadata, but the DB backstop is four partial-unique indexes in KamoInitializer whose type IN(...) lists HARD-CODE the single-active types. Both the enum Javadoc and the DDL comment call for a shared-lib test that asserts the two stay in sync — it did not exist. Add it: the three DDL index lists are mirrored here and asserted to (a) union exactly to singleActiveTypes(), disjoint + complete; (b) split cleanly by ownership — native = the REGISTRY_OWNED single-active types, issuer+loan = the OWNED_ELSEWHERE ones, both DERIVED from the enum so a new single-active type fails until the DDL is updated; (c) contain no MULTI_VALUE type. Currently in sync (16 types). 4 tests green.

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