47
modules/an_banners/sql/install.php
Normal file
47
modules/an_banners/sql/install.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?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;
|
||||
Reference in New Issue
Block a user