Skip to content

Instantly share code, notes, and snippets.

@ashsmith
Last active November 8, 2017 19:16
Show Gist options
  • Save ashsmith/4279368 to your computer and use it in GitHub Desktop.
Save ashsmith/4279368 to your computer and use it in GitHub Desktop.
Magento: Update Order Numbers SQL
-- Update Order increment id to start at 123456789
UPDATE `eav_entity_store` SET `increment_last_id` = '123456789' WHERE `entity_type_id` = '5';`
-- Update Invoice increment id to start at 123456789
UPDATE `eav_entity_store` SET `increment_last_id` = '123456789' WHERE `entity_type_id` = '6';
-- Update Credit Memo increment id to start at 123456789
UPDATE `eav_entity_store` SET `increment_last_id` = '123456789' WHERE `entity_type_id` = '7';
-- Update Shipment increment id to start at 123456789
UPDATE `eav_entity_store` SET `increment_last_id` = '123456789' WHERE `entity_type_id` = '8';
-- Update Order increment id to start at 012345678
UPDATE `eav_entity_store` SET `increment_last_id` = '012345678', `increment_prefix` = '0' WHERE `entity_type_id` = '5';
-- Update Invoice increment id to start at 012345678
UPDATE `eav_entity_store` SET `increment_last_id` = '012345678', `increment_prefix` = '0' WHERE `entity_type_id` = '6';
-- Update Credit Memo increment id to start at 012345678
UPDATE `eav_entity_store` SET `increment_last_id` = '012345678', `increment_prefix` = '0' WHERE `entity_type_id` = '7';
-- Update Shipment increment id to start at 012345678
UPDATE `eav_entity_store` SET `increment_last_id` = '012345678', `increment_prefix` = '0' WHERE `entity_type_id` = '8';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment