I'm working on a project with multiple services that share a common database. I'd like to minimize the risk that operational errors cause data corruption and one of the cases I'd like to guard against is running stale code against a new DB.
That is, I'd like to somehow stamp the DB with a version and then have all services older than that version error out on startup. That way, once the DB is migrated, old code can't be started against the newer DB. Are there any off-the-shelf ways other folks have been tackling this? I'm using Django, but I'm also interested in solutions used by other frameworks.