I'd like to design a SQL schema where the whole schema can be versioned without sacrificing referential integrity.