Update paragraph data

Example of how we can update paragraph data which is attached to a block content.

Advanced use for complex updates

CAUTION : Developers Only - Not for Production sites.

If you want to change the structure of an entity type (Example : make non translatable entity to a translatable) and your entity has data, you can try the following steps.

CAUTION :

  • You must structure the entity before starting the developments.
  • This type of operations must not produce on production sites.

1. Cleanup the backup data table.
drush upe --clean

Use in production sites

Using this module in production sites need particular precautions.

For Site administrators and Webmasters

Normally you don't need to use this module on your sites in production. Anyway if you need to update an entity type schema you can do it.

Update entities programmatically

To update an entity type programmatically, Please follow the following steps.

1. Check current entity status and make an image (Here get the ids list).
  Example :

$ids_old = \Drupal::entityQuery('entity_update_tests_cnt')->execute();

2. Update the correct entity type.
  Example :
 

Entity Update usage from web browser

The module provide a web browser UI. You can check entities status, list entities content and run update from browser.

Entities List : Show entities list (items list)
Link : /admin/config/development/entity-update/list

Show entities

Entity Status : Check Entity update status
Link : /admin/config/development/entity-update/status

Status

Entity Update from drush

Usage Examples : entity-update (Via drush)

Drush command : entity-update
Alias : upe

1. Show Entities to update
drush upe --show

2. Update Entities basic way.
This method is does not work if any of the entity contains data.
drush upe --basic
This method is generate an error if can't use the basic method (But recommended to try before --all method).
drush upe --basic --force

Pages

Subscribe with RSS Subscribe to RSS - entity update