Isomorphic schemes over DVR Let $S, S'$ be flat schemes over a DVR. Their generic fibers are isomorphic and their special fibers are isomorphic as well.
Does that imply $S$ and $S'$ isomorphic? If not, what can go wrong?
Thanks in advance!
 A: Here is a counterexample (vaguely inspired by Kevin Casto's approach, and very similar to nfdc23's example). The moduli space $\mathcal M_g$ of smooth genus $g \geq 2$ curves is irreducible, and has a closed subset corresponding to curves admitting a nontrivial automorphism (this is a strict subset if $g \geq 3$). Thus we can form a family whose general member has no automorphisms, but a special member is, say, hyperelliptic.
That is, we can produce a family $\mathscr C \to \operatorname{Spec} \mathbb C[x]_{(x)}$ whose generic fibre $C$ has no automorphisms and whose special fibre $C_0$ has a hyperelliptic involution $\sigma \colon C_0 \to C_0$ that does not lift to an automorphism of $C$. Let $p \in C_0$ be a point not fixed by $\sigma$, and consider the flat (but non-proper) families $\mathscr C \setminus\{p\}$ and $\mathscr C\setminus\{\sigma(p)\}$ over $\operatorname{Spec}\mathbb C[x]_{(x)}$.
Now the generic fibres are both $C$, and the special fibres are $C_0 \setminus\{p\}$ and $C_0\setminus\{\sigma(p)\}$, which are isomorphic through $\sigma$. But a global isomorphism would induce an automorphism of $C$, which therefore has to be the identity on $C$. The only extension of the identity to a map $\mathscr C \setminus \{p\} \to \mathscr C$ is the inclusion, which does not land in $\mathscr C \setminus\{\sigma(p)\}$. (Informally: '$p$ cannot go to $\sigma(p)$'.)
Remark. I do not have an example of a proper family. In fact, all the counterexamples suggested so far are non-proper.
A: Let $\mathcal{X}\rightarrow \textrm{Spec}\,\mathbb{C}[[t]]$ be a flat family of K3 surfaces such that the central fiber $X_0$ has a $-2$ curve $C$. Then one can perform a flop along $C$ inside the threefold $\mathcal{X}$, thus producing another family $\mathcal{X}'\rightarrow \textrm{Spec}\,\mathbb{C}[[t]]$. These families are not isomorphic even though they are fiberwise isomorphic (i.e. the general fibers and special fibers are individually isomorphic). This is related to the fact that the moduli stack of smooth K3 surfaces is not separated. To produce a separated moduli space, one must contract ADE configurations of $-2$ curves, of which the above example is the simplest.
A: If we are all pitching in our favorite counterexamples, consider a smooth, projective morphism $\pi:S\to \text{Spec}(R)$ over a DVR whose generic fiber is the Hirzebruch surface $\mathbb{P}^1\times \mathbb{P}^1$ and whose special fiber is the Hirzebruch surfaces $\Sigma_2 = \mathbb{P}_{\mathbb{P}^1}(\mathcal{O}(-1)\oplus \mathcal{O}(+1))$.  For such a family, there is an integer invariant; roughly the order of vanishing at the closed point of the DVR of the "modulus" of the moduli space of Hirzebruch surfaces.  More precisely, it is the length of the torsion sheaf $R^1\pi_* \textit{Hom}_{\mathcal{O}_S}(\Omega_\pi,\mathcal{O}_S)$.  This integer invariant can take on any positive integer value.  Thus, there exist families $S$, $S'$ as above such that the invariant is $1$, respectively $2$.    
