Earlier today I created a migration file for creating a table with a lot of columns, foreign keys etc. Accidentally I deleted it. Is there any way to restore it? Is there a recycle bin into the project?
I use Visual Studio Code editor. There is an option there: Open the Command Palette by pressing Cmd+Shift+P
Paste the phrase "Local History: Find Entry to Restore" . I could not find the file
Thanks for answering.
@shez1983 The term here is commit. You don't need to upload changes anywhere as long as you get in the habit of committing frequently.
@adamnet It looks like VSCode has this feature, sort of. Type CTRL/CMD + P, and find "Local history: Find Entry to Restore". You should find your file contents there. Unlike in PHPStorm, it doesn't look like you can straight up restore the file from history (the IDE gets confused because the file doesn't exist), but at least you can copy the contents and re-create it.