Current path: home/webdevt/www/schtroumpf.fr/modules/an_sizeguide/sql/
?? Go up: /home/webdevt/www/schtroumpf.fr/modules/an_sizeguide
<?php
/**
* 2021 Anvanto
*
* NOTICE OF LICENSE
*
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
*
* @author Anvanto <anvantoco@gmail.com>
* @copyright 2021 Anvanto
* @license Valid for 1 website (or project) for each purchase of license
* International Registered Trademark & Property of Anvanto
*/
/*
an_size_guide_widgets
id_widget
active
content
position
relation
relation:
- all 0
- categories 1
- products 2
*/
if (!defined('_PS_VERSION_')) {
exit;
}
$sql = [];
$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'an_size_guide_widgets` (
`id_widget` int(10) unsigned NOT NULL AUTO_INCREMENT,
`active` tinyint(1) unsigned NOT NULL DEFAULT 1,
`position` int(10) NOT NULL,
`relation` int(10) NOT NULL,
PRIMARY KEY(`id_widget`)
) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET = utf8';
$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'an_size_guide_widgets_lang` (
`id_widget` int(10) unsigned NOT NULL,
`sizeguide_title` varchar(255) NOT NULL,
`sizeguide_content` text,
`id_lang` varchar(255) NOT NULL,
PRIMARY KEY(`id_widget`, `id_lang`)
) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET = utf8';
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'an_size_guide_widgets_shop` (
`id_widget` int(10) unsigned NOT NULL,
`id_shop` int(10) unsigned NOT NULL,
PRIMARY KEY (`id_widget`, `id_shop`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'an_size_guide_widgets_relations` (
`id_relation` int(11) NOT NULL AUTO_INCREMENT,
`widget` int(11) NOT NULL,
`id_type` int(11) NOT NULL,
`type` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id_relation`)
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;';
return $sql;