Make hr_job_application.member_id nullable

FeatureInitializerService
Ya
4 Septemba 2026, 04:53 UTC
Mwandishi
Kamo
Ahadi ya
63efb66

ddl-auto adds columns; it never relaxes constraints. Flipping optional=false to true on the entity changes what the ORM believes and nothing about what the database enforces — the mapping says nullable, the column stays NOT NULL, and the first public application fails on insert inside a @Transactional method whose rollback removes the evidence. Also backfills purge_after for every application that predates the retention policy. Null there means "keep forever", so without this the sweep would only ever cover applications filed after the feature shipped, which is not a retention policy. The (posting, member) unique constraint is deliberately left alone: once member_id can be null it stops constraining public rows, which is what we want — Postgres treats NULLs as distinct, and public applicants are deduplicated on email in the service, where two people sharing an inbox get a message rather than a constraint violation.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei