2015-08-13 12:41:23 +02:00

55 lines
1.6 KiB
PHP

<?php
$sql = array();
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ads` (
`id_block_ads` int(11) NOT NULL AUTO_INCREMENT,
`hook_name` varchar(255) NOT NULL,
`label` varchar(255) NOT NULL,
`width` int(11) NOT NULL,
`height` int(11) NOT NULL,
`date_add` DATETIME NOT NULL,
`date_upd` DATETIME NOT NULL,
PRIMARY KEY (`id_block_ads`)
);';
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ads_lang` (
`id_block_ads` int(11) NOT NULL,
`id_lang` int(11) NOT NULL,
`id_shop` int(11) NOT NULL,
`content` TEXT NOT NULL,
PRIMARY KEY (`id_block_ads`,`id_lang`,`id_shop`)
);';
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ads_publication` (
`id_publication` int(11) NOT NULL AUTO_INCREMENT,
`id_block_ads` int(11) NOT NULL,
`id_shop` int(11) NOT NULL,
`date_from` DATETIME NOT NULL,
`date_to` DATETIME NOT NULL,
`active` int(11) NOT NULL,
`date_add` DATETIME NOT NULL,
`date_upd` DATETIME NOT NULL,
PRIMARY KEY (`id_publication`)
);';
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ads_publication_lang` (
`id_publication` int(11) NOT NULL,
`id_lang` int(11) NOT NULL,
`content` TEXT NOT NULL,
PRIMARY KEY (`id_publication`,`id_lang`)
);';
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ads_publication_page` (
`id_publication` int(11) NOT NULL ,
`page_name` varchar(255) NOT NULL,
PRIMARY KEY (`id_publication`, `page_name`)
);';
$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'ads_publication_other` (
`id_publication` int(11) NOT NULL,
`page_name` varchar(255) NOT NULL,
`id_free` varchar(255) NOT NULL,
PRIMARY KEY (`id_publication`, `page_name`, `id_free`)
);';