Matched up all the sql changes to the create sql and and updated the length on primaryip to allow for ipv6 addresses or host names. close #397