?? GreyFile — Mystic File Browser

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



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

?? Viewing: install.php

<?php
/**
* 2022 Anvanto
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
*
*  @author    Anvanto <anvantoco@gmail.com>
*  @copyright 2022 Anvanto
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*/

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

$sql = [];

$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'an_productextratabs` (
    `id_tab` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `active` tinyint(1) unsigned NOT NULL DEFAULT 1,
    `combinations` tinyint(1) unsigned NOT NULL DEFAULT 0,
    `relation` int(10) NOT NULL,
    `position` int(10) NOT NULL,
    PRIMARY KEY(`id_tab`)
) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET = utf8';

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

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

$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'an_productextratabs_relations` (
    `id_relation` int(11) NOT NULL AUTO_INCREMENT,
    `type` tinyint(1) unsigned NOT NULL DEFAULT 0,
    `id_tab` int(11) NOT NULL,
    `id_type` int(11) NOT NULL,
  PRIMARY KEY (`id_relation`)
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;';


return $sql;


??

??