On Sat, 2011-05-07 at 02:59 +0100, Petur Kirke wrote:
  Hello
 First of all:
 Our system - build on Fred - has been running now for 1 year - with succes !
 Fred is good !
 Then:
 We have been thinking about implementing a new function to our system.
 Sometimes it happens that our administration deletes a domain name by a
 mistake.
 So the function we were thinking about to implement is an UNDO delete
 function.
 Question 1) Would this be possible ?
 Question 2) If yes, can you explain a "secure" way to do this ? 
Hi Petur,
congratulation to such a great anniversary! :)
I can imagine this functionality. Actually, delete of any objects
consists just from:
 - setting erdate in table object_registry where id=ID
 - deleting record in table object where id=ID
 - deleting record in table domain(contact,nsset,..) where id=ID
Fortunately, records in object and domain tables has their copies in
object_history and domain_history tables. The pointer to these records
is stored in object_registry.historyid and point to historyid column in
these tables.
So by my best guess undo could be possible by reverting these three
changes.
Jaromir
 regards
 Petur Kirke
 PHP Programmer
 .fo
  
--
Jaromir Talir
technicky reditel / Chief Technical Officer
-------------------------------------------
CZ.NIC, z.s.p.o.  --    .cz domain registry
Americka 23, 120 00 Praha 2, Czech Republic
mailto:jaromir.talir@nic.cz  
http://nic.cz/
sip:jaromir.talir@nic.cz tel:+420.222745107
mob:+420.739632712       fax:+420.222745112
-------------------------------------------