Guest User

Untitled

a guest
May 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. SET FOREIGN_KEY_CHECKS = 0;
  2.  
  3. TRUNCATE TABLE catalog_category_entity;
  4. TRUNCATE TABLE catalog_category_entity_datetime;
  5. TRUNCATE TABLE catalog_category_entity_decimal;
  6. TRUNCATE TABLE catalog_category_entity_int;
  7. TRUNCATE TABLE catalog_category_entity_text;
  8. TRUNCATE TABLE catalog_category_entity_varchar;
  9. TRUNCATE TABLE catalog_category_product;
  10. TRUNCATE TABLE catalog_category_product_index;
  11.  
  12. 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', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '1', '0', '0', '1'),
  13. ('2', '3', '1', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '1/2', '1', '1', '0');
  14.  
  15. INSERT INTO `catalog_category_entity_int` (`value_id`, `attribute_id`, `store_id`, `entity_id`, `value`) VALUES
  16. ('1', '69', '0', '1', '1'),
  17. ('2', '46', '0', '2', '1'),
  18. ('3', '69', '0', '2', '1');
  19.  
  20. INSERT INTO `catalog_category_entity_varchar` (`value_id`, `attribute_id`, `store_id`, `entity_id`, `value`) VALUES
  21. ('1', '45', '0', '1', 'Root Catalog'),
  22. ('2', '45', '0', '2', 'Default Category');
  23.  
  24. SET FOREIGN_KEY_CHECKS = 1;
  25.  
  26. DELETE FROM url_rewrite WHERE entity_type = 'category';
Add Comment
Please, Sign In to add comment