I accidentally deleted core doctype - Address

Hello,
I accidentally deleted core doctype(Address). I have to restore it as well as restore the datas (3000+ datas were stored in Address doctype). I am restoring the doctype, will this cause any data loss ?

Framework doesn’t delete table in database when doctype is deleted. So most likely all you’ve deleted is a row from “DocType” table.

Just resetting the code to restore deleted doctype file and bench migrate will bring it back.

This is a red flag though. How were you able to delete standard doctype in production? Is development mode enabled? :smile:

3 Likes

Thank you for the reply @ankush ,
This happened in Server. Actually the scenario was when I was deleting a Role,it showed a pop-up that it’s linked with contact and address. So I clicked the contact and address link and directly deleted them . After that only , I realized those were doctypes not documents :smiling_face_with_tear::walking_man:t2:.

What I did now is I restored the doctype and back-up data from “Deleted Document”…
Thus it will restore the data up to 2AM…:melting_face:

Thank you so much for the convo. The flow might have stuck if it was not restored.