Let me point out that losing migration files is a very bad situation and should be avoided at all costs, but if it happens, having a step-by-step way to preserve the database is a good thing to have. It is a terrible situation to be in if your database/models/migrations are a shared state across multiple team members, and that would require a coordinated halt and cleanup so everyone can move forward from the same base state again, with a proper migration files workflow from then on.
Let's assume you have models, any number of migration files, all of those applied to your existing database. Now for some reason, poof!, all the migration files are gone.