A primary school will be rebuilt after councillors unanimously backed plans to demolish the existing RAAC-affected building and construct a new two-storey school.