update script for news to categories table

if a news or category is deleted, we want to delete the relations instead of getting a sql error
test for references within a model