script to migrate db to postgres