Supercoductivity in Cuprates, Nickelates and the Hubbard Model