Update entity to change increment ID

Update the entity using the following query:

ALTER TABLE sequence_{entity_type}_{store_id} AUTO_INCREMENT = {new_increment_value};
INFO
Important: The new increment value must be greater than the current one.

After executing the following query:

ALTER TABLE sequence_order_1 AUTO_INCREMENT = 2000;

The next order placed at the store with ID=1 will have the ID ‘#100002000’.

Before executing the ALTER TABLE query on a production environment of Adobe Commerce on cloud infrastructure, we strongly recommend performing these steps:

  • Test the entire procedure of changing the increment ID on your staging environment
  • Create a DB backup to restore your Production DB in case of failure

[any supported version]

Previous pageMultiple sites and views
Next pageSet up in the Admin

Commerce