Move schema logic into an external file.