My Snippet After Installing/Uninstalling Deleting Original ENV Variables and Function

Options
I created a snippet based on one of my api endpoints that included a database, two functions, and 5 environmental variables.
Installed the snippet, then uninstalled it.
Afterwards, I noticed that my 5 original environmental variables have also been removed/deleted along with the function I pasted below. 

Comments

  • Inayet Hadi
    Options
    Lesson learned, when creating a snippet to share with others and then I want to test it out as well, to make sure that I rename everything that I want to share in a snippet so that if I install it and then want to delete/remove the snippet that it does not delete/remove my original information ie env vars, funcs, and anything else that I built the snippet with.

     I guess the messaging could be a little clear when uninstalling one own's snippet to state that your original information db, funcs, env vars, and etc will also be deleted. 
  • Sean Montgomery
    Sean Montgomery Administrator

    ADMIN

    Options
    Installing the snippet into the original workspace would cause an issue. We've never had anyone do that, but we should have a warning for that use case.

    We are able to restore your instance from a backup. Check the support thread.
  • Inayet Hadi
    Options
    Hi Sean, Thank you for responding. Through the support chat the offer was made, however the backup was not near where the deletion occurred. If I had agreed with the backup it would have deleted a lot work.

    No software is perfect as it is built by humans, however, keep making it better, I'll put a feature request, and hopefully if enough interest that you can guy can devote to create a solution.

    Also this event of me losing data when installing my own snippet and then deleting it has made realize to clone then change all names before creating a snippet was a good lesson to learn. This event was an even greater learning opportunity and a great way to redo and make better than before. I am finally learning to like and use functions in my stack where the logic happens elsewhere  but I can reference them in the main function.