Files
wyczarujprezent.pl/modules/an_banners/sql/install.php
Jacek Pyziak ce27ff88f3 update
Co-authored-by: Copilot <copilot@github.com>
2026-04-25 21:31:33 +02:00

47 lines
1.4 KiB
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_banners` (
`id_banner` int(10) unsigned NOT NULL AUTO_INCREMENT,
`special_id_banner` varchar(50) NOT NULL,
`hook` varchar(255) NOT NULL,
`col` varchar(255) NOT NULL,
`active` tinyint(1) unsigned NOT NULL DEFAULT 1,
`position` int(10) NOT NULL,
`template` varchar(255) NOT NULL,
PRIMARY KEY(`id_banner`)
) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET = utf8';
$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'an_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_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;