Fixed postgres schema errors