Part of the Entity ecosystem · 310 projects
This module allows you to change the ID of an entity and automatically updates all references to that entity across the database. It directly modifies database tables for performance and ensures data integrity by identifying all related fields. Always back up your database before using this tool.
The module provides a drush command drush entity:change-id [entity_type_id] [old_id] [new_id] to update entity IDs while maintaining data integrity across the entire database schema.
Automated Schema Mapping: Leverages `EntityStorageInterface` and its `tableMapping` to dynamically identify every table and column associated with a specific entity type, ensuring no core data is missed during an ID change.
Automatic Reference Handling: Scans the database for all `entity_reference` and `dynamic_entity_reference` fields pointing to the target entity type and updates those foreign keys simultaneously to preserve relationships.
Direct SQL Execution: Updates are performed using direct database queries rather than the Entity API. This ensures high performance and prevents the overhead of loading and saving individual entities.
Because this module operates directly on the database, no entity update hooks are dispatched during the process. Absolutely always backup your database before using the module!. Also, primary key auto increment is not yet adjusted automatically if new IDs exceed the current next id. This feature is mandatory, to get the module ready for version 1.0.0.
Ask your assistant about Entity Id Manager
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Entity ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.x-dev | Dev | 9–11 | Nov 2, 2023 |