I installed Magento 1.9.1 via CPanel and (at least) the table _customer_entity was not created. Not sure yet if missing any other tables. Store seems to work otherwise but DB can't store customer and order data (charges go through but apparently nothing updates after). Didn't realize it until after setting up store so would rather not have to reinstall from scratch (and risk same problem anyway).
I haven't been able to find the schema/structure for the _customer_entity table or an install script that can add the table. I saw a reference on this board to database repair option--how do I access/run that? Will it preserve existing data? Can someone please point me in the right direction? Thanks
If you have a missing table - I would worry that there will be more issuse with your install than you're currently seeing.
Can you not re-install from scratch and see if that fixes the issue?
If for some reason you can't / don't want to do that... then try the below code and I would also let us know which exact version you are using and how many tables you have actually created so we can see if there are any more tables missing.
The create table syntax for the customer_entity table is below..
CREATE TABLE `customer_entity` ( `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity Id', `entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity Type Id', `attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Set Id', `website_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Website Id', `email` varchar(255) DEFAULT NULL COMMENT 'Email', `group_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Group Id', `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id', `store_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Store Id', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Created At', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Updated At', `is_active` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Is Active', `disable_auto_group_change` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Disable automatic group change based on VAT ID', PRIMARY KEY (`entity_id`), UNIQUE KEY `UNQ_CUSTOMER_ENTITY_EMAIL_WEBSITE_ID` (`email`,`website_id`), KEY `IDX_CUSTOMER_ENTITY_STORE_ID` (`store_id`), KEY `IDX_CUSTOMER_ENTITY_ENTITY_TYPE_ID` (`entity_type_id`), KEY `IDX_CUSTOMER_ENTITY_EMAIL_WEBSITE_ID` (`email`,`website_id`), KEY `IDX_CUSTOMER_ENTITY_WEBSITE_ID` (`website_id`), CONSTRAINT `FK_CUSTOMER_ENTITY_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `FK_CUSTOMER_ENTITY_WEBSITE_ID_CORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `core_website` (`website_id`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='Customer Entity';
Table created perfectly. I can now view orders and customer information in the dashboard Sales->Orders, even the older ones before I added the customer_entity table.
However when I go to Reports->Sales->Orders they do not show up (says no data found). Is there a setting I'm missing? Hopefully not more tables--with the customer entity table there are now 250 tables.
By the way, which tables actually hold the order/customer data? When I browse the customer_entity table there are no rows there, even though Sales->Orders show all the orders and I can drill down into them.