Content missing after deployed older project version

Hey I noticed something, when working on our project, I added a new content type with some test content. Meanwhile, my colleague was testing a feature and unaware of my changes, deployed an older repo state without the new type schema to the test server. And afterwards, when I deployed my version again, all the test content was missing. Is there a way to prevent that? In the future, it might be an issue if we have to rebuild missing content every time someone deploys a test version missing a particular type definition.