change db structure to postgres