Skip to content

Instantly share code, notes, and snippets.

@koobitor
Created September 16, 2019 04:17
Show Gist options
  • Select an option

  • Save koobitor/fa97fdc10e901898683f428c57fb02bd to your computer and use it in GitHub Desktop.

Select an option

Save koobitor/fa97fdc10e901898683f428c57fb02bd to your computer and use it in GitHub Desktop.
```
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `catalog_category_entity`;
TRUNCATE TABLE `catalog_category_entity_datetime`;
TRUNCATE TABLE `catalog_category_entity_decimal`;
TRUNCATE TABLE `catalog_category_entity_int`;
TRUNCATE TABLE `catalog_category_entity_text`;
TRUNCATE TABLE `catalog_category_entity_varchar`;
TRUNCATE TABLE `catalog_category_product`;
TRUNCATE TABLE `catalog_category_product_index`;
TRUNCATE TABLE `catalog_category_product_index_tmp`;
INSERT INTO `catalog_category_entity` (`entity_id`, `attribute_set_id`, `parent_id`, `created_at`, `updated_at`, `path`, `position`, `level`, `children_count`) VALUES (1, 0, 0, '2016-10-10 10:10:50', '2016-10-10 10:10:50', '1', 0, 0, 1);
SET FOREIGN_KEY_CHECKS = 1;
```
@koobitor
Copy link
Copy Markdown
Author

ALTER TABLE catalog_category_entity AUTO_INCREMENT = 1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment