thz - migrate to postgresql