Hochul faced fierce opposition from the teachers union.