Auto increment moved to triggers for Oracle 11 compatability