Bonjour, je suis en train de mettre a jour une très vieille boutique. J'ai installé la dernier version de PS et je suis en train de faire des scripts de récuprération des données.
Je suis en train de récupérer les stock et sur la nouvelle version j'ai deux nouvelles tables: stock et stock_available. Sur la 1.4 je n'avais que stock_mvt, stock_mvt_reason, ps_stock_mvt_reason_lang.
A quoi sert ces deux tables stock et stock_available? Je vois que je n'ai pas non plus toutes les tables warehouse...
CREATE TABLE `ps_stock` (
`id_stock` int unsigned NOT NULL AUTO_INCREMENT,
`id_warehouse` int unsigned NOT NULL,
`id_product` int unsigned NOT NULL,
`id_product_attribute` int unsigned NOT NULL,
`reference` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`ean13` varchar(13) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`isbn` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`upc` varchar(12) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`physical_quantity` int unsigned NOT NULL,
`usable_quantity` int unsigned NOT NULL,
`price_te` decimal(20,6) DEFAULT '0.000000',
PRIMARY KEY (`id_stock`),
KEY `id_warehouse` (`id_warehouse`),
KEY `id_product` (`id_product`),
KEY `id_product_attribute` (`id_product_attribute`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `ps_stock_available` (
`id_stock_available` int unsigned NOT NULL AUTO_INCREMENT,
`id_product` int unsigned NOT NULL,
`id_product_attribute` int unsigned NOT NULL,
`id_shop` int unsigned NOT NULL,
`id_shop_group` int unsigned NOT NULL,
`quantity` int NOT NULL DEFAULT '0',
`physical_quantity` int NOT NULL DEFAULT '0',
`reserved_quantity` int NOT NULL DEFAULT '0',
`depends_on_stock` tinyint unsigned NOT NULL DEFAULT '0',
`out_of_stock` tinyint unsigned NOT NULL DEFAULT '0',
`location` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`id_stock_available`),
UNIQUE KEY `product_sqlstock` (`id_product`,`id_product_attribute`,`id_shop`,`id_shop_group`),
KEY `id_shop` (`id_shop`),
KEY `id_shop_group` (`id_shop_group`),
KEY `id_product` (`id_product`),
KEY `id_product_attribute` (`id_product_attribute`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;