bug fix-migrate postgres