Fixed keys
Added trigger, log tables