?? GreyFile — Mystic File Browser

Current path: home/webdevt/www/schtroumpf.fr/modules/an_homeproducts/sql/



?? Go up: /home/webdevt/www/schtroumpf.fr/modules/an_homeproducts

?? Viewing: install.php

<?php
/**
 * 2022 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  2022 Anvanto
 *  @license    Valid for 1 website (or project) for each purchase of license
 *  International Registered Trademark & Property of Anvanto
 */

if (!defined('_PS_VERSION_')) {
    exit;
}

$sql = [];

$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'an_homeproducts_blocks` (
    `id_block` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `special_id_block` varchar(50) NOT NULL,
    `type` varchar(25) NOT NULL,
    `active` tinyint(1) unsigned NOT NULL DEFAULT 1,
    `show_sort` tinyint(1) unsigned NOT NULL DEFAULT 0,
    `products_display` int(10) NOT NULL DEFAULT 8,
    `id_category` int(10) NOT NULL DEFAULT 0,
    `show_sub_cat` tinyint(1) unsigned NOT NULL DEFAULT 0,
    `position` int(10) NOT NULL,
    PRIMARY KEY(`id_block`)
) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET = utf8';

$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'an_homeproducts_blocks_products` (
    `id_block` int(10) unsigned NOT NULL,
    `id_product` int(10) unsigned NOT NULL,
    PRIMARY KEY(`id_block`, `id_product`)
) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET = utf8';

$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'an_homeproducts_blocks_categories` (
    `id_block` int(10) unsigned NOT NULL,
    `id_category` int(10) unsigned NOT NULL,
    PRIMARY KEY(`id_block`, `id_category`)
) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET = utf8';

$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'an_homeproducts_blocks_shop` (
    `id_block` int(10) unsigned NOT NULL,
    `id_shop` int(10) unsigned NOT NULL,
    PRIMARY KEY (`id_block`, `id_shop`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';

$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'an_homeproducts_blocks_lang` (
    `id_block` int(10) unsigned NOT NULL,
    `title` varchar(255) NOT NULL,
    `text` text,
    `link` varchar(255) NOT NULL,
    `id_lang` varchar(255) NOT NULL,
    PRIMARY KEY(`id_block`, `id_lang`)
) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET = utf8';



$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'an_homeproducts_banners` (
    `id_banner` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `special_id_banner` varchar(50) NOT NULL,
    `block` int(10) unsigned NOT NULL,
    `block_position` int(10) unsigned NOT NULL,
    `col` int(10) NOT NULL DEFAULT 12,
    `color_title` varchar(20) NOT NULL,
    `color_text` varchar(20) NOT NULL,
    `template` varchar(255) NOT NULL,
    `active` tinyint(1) unsigned NOT NULL DEFAULT 1,
    `position` int(10) NOT NULL,
    PRIMARY KEY(`id_banner`)
) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET = utf8';

$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'an_homeproducts_banners_lang` (
    `id_banner` int(10) unsigned NOT NULL,
    `title` varchar(255) NOT NULL,
    `text` text,
    `link` varchar(255) NOT NULL,
    `image` varchar(255) NOT NULL,
    `id_lang` varchar(255) NOT NULL,
    PRIMARY KEY(`id_banner`, `id_lang`)
) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET = utf8';

$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'an_homeproducts_banners_shop` (
    `id_banner` int(10) unsigned NOT NULL,
    `id_shop` int(10) unsigned NOT NULL,
    PRIMARY KEY (`id_banner`, `id_shop`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';

return $sql;


??

??