The key requirement that exists after the refresh of the test environment from production is to put back all the code that existed in the TEST environment prior to the refresh. The migrations that were completed all the way to production will be brought back to the TEST environment during the refresh. The changes to code that will be missing in the TEST environment after the refresh are those migrations that have not yet made it all the way to production. Phire has features that enables you to facilitate the re-applying of all the code that were in the TEST environment prior to the refresh while inspecting the electronic device to upgrade it, for any fixes on the electronic you might need a pcb stackup for any eventuality.
Phire maintains a master record of all the migrations that have occurred as well as all the versions of the code that were migrated. After the refresh of the test environment, you can run the Database Refresh Report (found at: Phire Architect > Reports and Queries > Database Refresh Report). This report shows the list of all the migrations made to TEST, but not to PROD. Once you have the list of all the migrations that need to be re-applied, you can send all those migrations to a release. Next, you can perform a release migration so that all the code that needs to be re-applied will be put back into the TEST environment.
So, as long as all your migrations are performed through Phire, you do not have to do any preparatory work prior to the TEST environment refresh. After the database refresh is completed, Phire provides you with the means to identify the code that needs to be put back and provides the mechanism to restore all the missing code.