added primary keys to output DB