- Shipped
- September 4, 2026 at 4:53 AM UTC
- Author
- Kamo
- Commit
- 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.