Note: This is issue is part of #2721129: Workflow Initiative and is only meant for planning and governance sign-offs. Work will happen in child issues of this plan.

Some historic background: http://drupal4hu.com/node/233

This phase will deprecate the traditional delete method in our entity storage API and introduce two new methods; archive and purge. This is primarily important for replication and conflict management (see phase H) but also enables things like Trash module (see phase E).

The archive method is the logical replacement of the traditional delete method. But instead of erasing the entity from the database archiving will save a new revision with a boolean base field called "deleted" or "archived" set to TRUE. The storage API will add conditions on this base field where necessary. This method will also invoke a new hook called hook_entity_archive().

The purge method will erase an entity from the database and invoke hook_entity_purge(). The purge method will also invoke the deprecated hook_entity_delete() for backward compatibility reason as the traditional behaviour of this hook is to erase things from the database.

The advantage with deprecating the delete method is that we can introduce this in a backward compatible way. The archive and purge methods also have more explicit names to what they actually do, while delete is more ambiguous.

  1. #2725463: WI: Add StatusItem field type to store archived state
  2. #2725465: WI: Convert core to archive instead of delete

Sign-offs needed

Product manager

A product manager needs to sign-off on this plan as the above phases are required as part of a planned initiative.

Framework manager

A framework manager needs to sign-off on this plan as the above phases introduces major API additions (archive and purge).

Sub-system maintainers

The sub-system maintainers for the Entity API needs to sign-off on this plan as it significantly impacts the Entity API.

Sign-offs given

  • Product manager - pending
  • Framework manager - pending
  • Sub-system maintainers - pending

Comments

dixon_ created an issue. See original summary.

dixon_’s picture

Issue summary: View changes
dixon_’s picture

Issue summary: View changes
dixon_’s picture

dixon_’s picture

Issue summary: View changes
dixon_’s picture

Issue summary: View changes
dixon_’s picture

Issue tags: +Workflow Initiative
dixon_’s picture

Issue summary: View changes
xjm’s picture

Thanks dixon_!

Tagging this one since it's also a near-term. (Edit: too many "also".)

dixon_’s picture

Issue summary: View changes
Status: Active » Needs work

Making it clearer that we are still working on the plan.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dixon_’s picture

Title: WI: Enable archive/purge storage and introduce Trash module » WI: Phase D: Enable archive/purge storage
Issue summary: View changes
pwolanin’s picture

Being able to archive and restore was mentioned by webchick as an issue that came up in 2011 usability tests https://www.drupal.org/node/147723#comment-4498812

Given that it's very outdated, closing #147723: Deletion API for core as outdated and duplicate to this