Create HANDLES_PHI and PHI_EFFECTIVE_DATE on orgs

FeatureInitializerService
Shipped
August 3, 2026 at 1:26 AM UTC
Author
Kamo
Commit
a6c586a

Mirrors the two new Organization fields, following the OrgBrandingFieldsMigration convention, so the columns are reproducible on any environment rather than only existing where a ddl-auto pass happened to run. HANDLES_PHI is NOT NULL DEFAULT FALSE so existing tenants are explicitly outside the compliance boundary. PHI_EFFECTIVE_DATE is TIMESTAMP, not TIMESTAMPTZ, because the entity field is a LocalDateTime. The test is a drift guard, not a restatement: it reads column names off the entity by reflection and fails the build when an entity field has no ALTER. That is this convention's actual failure mode — someone adds a field, forgets the migration, and with ddl-auto:none in the services 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. Both columns are already present in the cluster; these ALTERs are idempotent.

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