migrating to postgres internal