  We compute self-consistently the Josephson current in a
superconductor-antiferromagnet-superconductor junction using a lattice model,
focusing on $0-\pi$ transitions occurring when the width of the
antiferromagnetic region changes from an even to an odd number of lattice
sites. Previous studies predicted $0-\pi$ transitions when alternating between
an even and an odd number of sites for sufficiently strong antiferromagnetic
order. We study numerically the magnitude of the threshold value for this to
occur, and also explain the physics behind its existence in terms of the
phase-shifts picked up by the quasiparticles constituting the supercurrent in
the antiferromagnet. Moreover, we show that this threshold value allows for
\textit{pressure-induced $0-\pi$ transitions} by destroying the
antiferromagnetic nesting properties of the Fermi surface, a phenomenon which
has no counterpart in ferromagnetic Josephson junctions, {offering a new way to
tune the quantum ground state of a Josephson junction without the need of
multiple samples.
