Well, I didn't have the problem in the case of multiple developers, but then I didn't have git.
One simple way is to enforce the rule that the database definition (schema) should be in the repository, along with a script creating and filling the test database.
When a new version of the database schema is commited, both the code to update dynamically the user database in the software, and the script to create the test database shall be commited along.
Then when you update your sandbox, you can either:
- run the script to reset your test database to the current version (for the revision that is checked out).
- compile and run the software to upgrade your old test database (any version) to the current version.