Add trigger for all related tables

Add trigger for all related tables