Planning for CRAP and entity revisions everywhere in core

Submitted by Anonymous (not verified) on Wed, 23/09/2015 - 07:46

<figure class="tmblr-embed tmblr-full" data-provider="youtube" data-orig-width="459" data-orig-height="344" data-url=""><iframe width="540" height="405" id="youtube_iframe" src=";enablejsap…; frameborder="0"></iframe></figure><p>At DrupalCon Barcelona this year I presented with <a href="; target="_blank">Dick Olsson</a> outlining a plan for CRAP (Create Read Archive Purge) and revisions (on all content entities) in core.</p><!-- more --><h2>Phase 0</h2><p><b>For Drupal 8.0.0</b><br/>Enable revisions by default (<a href="; target="_blank"></a&gt;) on content types in the standard install profile and when creating new content types.</p><h2>Phase 1</h2><p><b>For Drupal 8.1.0</b></p><ul><li>Improve the Revisions API performance, some of this will come from moving elements from the multiversion module into the entity API.<br/></li><li>Enable revisions by default for all content entity types. So not just nodes anymore but blocks, comments, taxonomy terms etc.</li><li>Introduce a revision hash, parents and tree. Each revision needs to have a parent so you know where it’s come from, each parent can have multiple child revisions.</li><li>Data migration - Moving all 8.0.0 sites to 8.1.0 will mean moving their data to the new revision system.</li></ul><h2>Phase 2</h2><p><b>For Drupal 8.2.0</b></p><ul><li>Remove the ability to not have revisions. To simplify the API and the data stored it makes sense to remove the ability to disable revisions. This will allow us to remove all the conditional code around if an entity has a revision or not.<br/></li><li>Delete is a new flagged revision. When deleting an entity a new revision will be created and this revision will be flagged as deleted. This is the archive element of the CRAP workflow.</li><li>Introduce purge functionality. There may be times when an entity needs to be completely deleted.</li><li>Commit trash module to core. Trash is just a UI for the delete flag. It displays all entities marked as deleted. It then allows these to be restored by creating a new revision not flagged deleted, or purged by removing the entity.</li></ul><p>Simple right?</p>

Add new comment