Page 1 of 1

Category Path Database table

Posted: Thu Jun 30, 2016 11:42 pm
by straightlight
There were recently some topics in the past regarding the creation of the category path database table that was not neither creating or created but not incrementing. I found the solution for OC v2.2.0.0 release.

Replace:

Code: Select all

DROP TABLE IF EXISTS `oc_category_path`;
CREATE TABLE `oc_category_path` (
  `category_id` int(11) NOT NULL,
  `path_id` int(11) NOT NULL,
  `level` int(11) NOT NULL,
  PRIMARY KEY (`category_id`,`path_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
with:

Code: Select all

DROP TABLE IF EXISTS `oc_category_path`;
CREATE TABLE `oc_category_path` (
  `category_id` int(11) NOT NULL,
  `path_id` int(11) NOT NULL,
  `level` int(11) NOT NULL,
  PRIMARY KEY (`category_id`,`path_id`),
  KEY `level` (`level`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
This should resolved the problem.

Note: The above should only be used for installation purposes.