我需要 Prestashop 才能在我的本地 WAMP 服务器上工作,我在安装 wordpress 时没有遇到任何问题,但是 prestashop 会向我抛出错误,所以我将不胜感激任何帮助。 安装卡在 12%。
创建数据库表
SQL 查询错误 PRIMARY KEY 的所有部分都必须为 NOT NULL;如果您需要在键中使用 NULL,请改用 UNIQUE
我尝试编辑 php.ini,更改超时计时器,然后尝试更改
CREATE TABLE `PREFIX_cart_product` (
`id_cart` int(10) unsigned NOT NULL,
`id_product` int(10) unsigned NOT NULL,
`id_address_delivery` int(10) UNSIGNED DEFAULT '0',
`id_shop` int(10) unsigned NOT NULL DEFAULT '1',
`id_product_attribute` int(10) unsigned DEFAULT NULL,
`quantity` int(10) unsigned NOT NULL DEFAULT '0',
`date_add` datetime NOT NULL,
PRIMARY KEY (`id_cart`,`id_product`,`id_product_attribute`,`id_address_delivery`),
KEY `id_product_attribute` (`id_product_attribute`),
KEY `id_cart_order` (`id_cart`, `date_add`, `id_product`, `id_product_attribute`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
到
CREATE TABLE `PREFIX_cart_product` (
`id_cart` int(10) unsigned NOT NULL,
`id_product` int(10) unsigned NOT NULL,
`id_address_delivery` int(10) UNSIGNED DEFAULT '0',
`id_shop` int(10) unsigned NOT NULL DEFAULT '1',
`id_product_attribute` int(10) unsigned DEFAULT NULL,
`quantity` int(10) unsigned NOT NULL DEFAULT '0',
`date_add` datetime NOT NULL,
UNIQUE(`id_cart`,`id_product`,`id_product_attribute`,`id_address_delivery`),
KEY `id_product_attribute` (`id_product_attribute`),
KEY `id_cart_order` (`id_cart`, `date_add`, `id_product`, `id_product_attribute`)
);
在安装/数据/db_structures.sql
什么都不做,SOS。
提前致谢
最佳答案
找到解决方案,
替换,
`id_product_attribute` int(10) unsigned DEFAULT NULL,
与
`id_product_attribute` int(10) unsigned DEFAULT '0',
在 prestashop\install\data\db_structure.sql 中
瞧!
关于mysql - Prestashop 在 Wamp 上安装错误创建数据库表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36131617/