If I pull back a cycle of codimension $c$ along a morphism of schemes I can easily see that the codimension can stay the same or the codimension can drop to all the way to $0$. But intuitively it seems the codimension can never increase. Is there a precise statement of this form?

To state it more carefully suppose $X,Y$ are irreducible schemes and $f:X \to Y$ is a morphism and $Z\subset Y$ is an irreducible subscheme of codimension $c$. Is it always true that if $T\subset f^{-1}(Z)$ is an irreducible component then $codim(T) \leq codim(Z)$?

If this is not true then are there reasonable hypothesis under which it is true, $X,Y$ Noetherian, finite type, smooth?

If $f$ is flat the codimension should be preserved but the inequality above seems to be true more generally.