50 lines
1.5 KiB
PHP
50 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* 2017-2019 Zemez
|
|
*
|
|
* JX Wishlist
|
|
*
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This source file is subject to the General Public License (GPL 2.0)
|
|
* that is bundled with this package in the file LICENSE.txt.
|
|
* It is also available through the world-wide-web at this URL:
|
|
* http://opensource.org/licenses/GPL-2.0
|
|
*
|
|
* DISCLAIMER
|
|
*
|
|
* Do not edit or add to this file if you wish to upgrade the module to newer
|
|
* versions in the future.
|
|
*
|
|
* @author Zemez
|
|
* @copyright 2017-2019 Zemez
|
|
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
|
|
*/
|
|
|
|
$sql = array();
|
|
|
|
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'jxwishlist` (
|
|
`id_wishlist` int(11) NOT NULL AUTO_INCREMENT,
|
|
`id_shop` int(10) unsigned NOT NULL,
|
|
`id_customer` int(10) unsigned NOT NULL,
|
|
`token` varchar(64) character set utf8 NOT NULL,
|
|
`name` varchar(64) character set utf8 NOT NULL,
|
|
PRIMARY KEY (`id_wishlist`, `id_shop`)
|
|
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
|
|
|
|
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'jxwishlist_product` (
|
|
`id_wishlist_product` int(10) NOT NULL auto_increment,
|
|
`id_wishlist` int(10) unsigned NOT NULL,
|
|
`id_product` int(10) unsigned NOT NULL,
|
|
`id_product_attribute` int(10) unsigned NOT NULL,
|
|
`quantity` int(10) unsigned NOT NULL,
|
|
`date_add` datetime NOT NULL,
|
|
PRIMARY KEY (`id_wishlist_product`)
|
|
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
|
|
|
|
foreach ($sql as $query) {
|
|
if (Db::getInstance()->execute($query) == false) {
|
|
return false;
|
|
}
|
|
}
|