KamoCRM

Create HANDLES_PHI and PHI_EFFECTIVE_DATE on orgs

FeatureInitializerService
Shipped
2 ஆகஸ்ட், 2026 அன்று 7:07 PM UTC
Author
Kamo
Commit
d90a708

Mirrors the two new fields on the Organization entity in kamo-shared-library, following the OrgBrandingFieldsMigration convention. HANDLES_PHI is NOT NULL DEFAULT FALSE so every existing tenant is explicitly outside the compliance boundary rather than silently inside it. PHI_EFFECTIVE_DATE is TIMESTAMP, not TIMESTAMPTZ, because the entity field is a LocalDateTime. SEQUENCING — this needs to run before the next service deploy. Services pin kamo-shared-library at a fixed version that is republished in place, so the first service to rebuild after that library change starts selecting these columns, and with ddl-auto:none in the services that fails until this runner has executed. The accompanying test is a drift guard, not a restatement: it reads the column names off the entity by reflection and fails the build if an entity field has no ALTER. That is the failure mode this whole convention has — someone adds a field, forgets the migration, and it surfaces as a production query error instead of at build time. Verified by mutation: removing the PHI_EFFECTIVE_DATE ALTER makes it fail with the actionable message, restoring it goes 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