writing the database_action and fk_file key