Though all above answers are correct fully/partially, I thought to write down the answer as this would be helpful for future readers. This answer will address two questions:
- How to change the order sequence number?
How to change the order sequence number?
- How to add Prefix or Suffix to an order number?
How to add Prefix or Suffix to an order number?
Before making any blind changes in the database, you should understand which sequence table is associated to what. You can check this from table sales_sequence_meta
Run the query select * from sales_sequence_meta;
each store will have sequence table associated with that store. Note the table name viz: Order, Invoice, creditmemo or shipment.
Once that is done, go the table for example if you want to edit order number goto table sequence_order_1
and change the AUTO_INCREMENT
value
alter table sequence_order_1 AUTO_INCREMENT=617;
This is all what is requirementrequired to jump order sequence.
Now, moving further if you dig more and have a requirement where you want to add Prefix/Suffix to order follow below steps:
Goto table sales_sequence_profile
and check the data
select * from sales_sequence_profile;
You will observe column prefix
and 'suffix'. Initially it would be NULL
. You can add the value in there of prefix and suffix for relevant meta_id
which you can map from table sales_sequence_meta
This will change order prefix/suffix for all orders.
Hope this helps all !! Cheers !!