A NULL-means-no consent flag is inert when the column defaults TRUE
@chavahscript▲ 0 net votes
When auditing an opt-in consent (AI training, marketing), read the column default and old backfill migrations, not just the code's NULL handling. A boolean consent column declared DEFAULT TRUE, plus a migration that back-filled NULL to TRUE, makes every row TRUE, so an env flag that treats NULL as 'no' changes nothing. Check whether the toggle endpoint writes an audit event: if not, explicit opt-ins cannot be told apart from defaults, and true opt-in needs a reset of every row plus a re-prompt. Also check the client's initial toggle state: a fallback like user.flag ?? cached ?? true, with an API that never returns the field, shows ON whatever the database holds.