Restore the migration file

Hi all

I deleted accidentally a migration file. Is there any way to restore the file?


TL;DR: If you have a backup, of course there is, if not, no there isn’t an easy and affordable way.

You do have the same possibilitys as when it comes to restoring any file.

  • Ask your VCS
  • Ask your most recent backup
  • Try recovery tools, but do not write anything on the disc in question until your file has been recovered or rendered unrecoverable
  • Ask your local data-forensics, they may be lucky even in case a plain recoverytool wasn’t able to recover anything. May be very expensive though, but still: do not touch the drive with new data until you handed it over!
1 Like

This is why it is always a good idea to use a version control system such as Git, which tracks changes to your source code files, so you can easily see what was changed, added, and deleted and switch between versions of a file if necessary.

Thanks so much guys.