I offer the following proposed/possible changes for discussion, before I write the implementing patch:
(1) Add to archive table these fields:
- ar_id (primary key)
- ar_log_id (the log_id of the deletion action)
(2) What about these fields? Is there a need for them or can we just rely on JOINs with the logging table?
- ar_log_timestamp (time of deletion)
- ar_log_user (deleting user id)
- ar_log_user_text (deleting user name)
- ar_log_comment (deletion reason)
(3) Would it be better to restore deleted pages to the same page id they had originally? That page id is stored in ar_page_id.