Reputation: 112
In Magento Community v1.5.1.0, how would one go about setting the starting (or next) Customer ID? By default, the first Customer ID is 1. I need to start at Customer ID 300000 after clearing out test data before moving a store into production.
Order, Invoice, Shipment, and Credit Memo ID's can be changed by updating the appropriate values in the eav_entity_store, but (contrary to the information here) there is not an increment entry for Customer ID there.
I scanned the database for a "customer"-related table that would achieve the same thing as eav_entity_store but no dice, and my Google-Fu failed as well.
Upvotes: 6
Views: 7039
Reputation: 37700
There is no increment for customer in eav_entity_store
but one can be created, perhaps in a module's install script...
$customerType = Mage::getModel('eav/entity_type')->loadByCode('customer');
Mage::getModel('eav/entity_store')
// customer increments are not per store so store_id is 0
->loadByEntityStore($customerType->getId(), 0)
// increments are varchar, not ints
->setIncrementPrefix('3')
->setIncrementLastId('300000')
->save();
Upvotes: 4
Reputation: 5042
I thought it was not possible in magento, But it will done by MySql query. Run the below query manually and you will get the user id starts from 300001
ALTER TABLE customer_entity AUTO_INCREMENT = 300001;
Upvotes: 9