added usefull foreign key constrains and update trigger for providing automatic transfer of updated rows to the history-tables