Moded the sql text to create new tables