borrowernumber in borrower_message_preferences is DEFAULT NULL in kohastructure.sql, despite ON DELETE CASCADE in the foreign key. Also borrower message preferences without a borrowernumber don't make any sense.