Example

If you are checking an auto-increment for an order on the store with ID=1, the table name would be:

'sequence_order_1'

If the value of the auto_increment column is 1234, the next order placed at the store with ID=1 will have the ID #100001234.

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};
WARNING
Important: The new increment value must be greater than the current one, not less!

Example

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 the 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
Previous pageAllocate more space for MySQL in Adobe Commerce on cloud
Next pageSet up Fastly for Starter plan on Cloud

Commerce


Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more