HEX
Server: Apache
System: Linux srv13.cpanelhost.cl 3.10.0-962.3.2.lve1.5.38.el7.x86_64 #1 SMP Thu Jun 18 05:28:41 EDT 2020 x86_64
User: cca63905 (4205)
PHP: 7.3.20
Disabled: NONE
Upload Files
File: /home4/cca63905/public_html/nueva/modules/pmproductvideoreviews/sql/install.php
<?php
/**
 * rec.reviews
 *
 * @author    Presta-Module.com <support@presta-module.com> - https://www.presta-module.com
 * @copyright Presta-Module - https://www.presta-module.com
 * @license   see file: LICENSE.txt
 *
 *           ____     __  __
 *          |  _ \   |  \/  |
 *          | |_) |  | |\/| |
 *          |  __/   | |  | |
 *          |_|      |_|  |_|
 */

if (!defined('_PS_VERSION_')) {
    exit;
}
$sql = [];
$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'pvr_rating` (
    `id_rating` INT UNSIGNED NOT NULL auto_increment,
    `id_api` VARCHAR(255) NULL,
    `id_shop` TINYINT UNSIGNED NOT NULL DEFAULT 1,
    `id_product` INT UNSIGNED NOT NULL,
    `id_lang` TINYINT UNSIGNED NOT NULL DEFAULT 0,
    `note` TINYINT UNSIGNED NOT NULL,
    `status` INT UNSIGNED NOT NULL,
    `id_customer` INT UNSIGNED NOT NULL,
    `id_order` INT UNSIGNED NOT NULL,
    `video_url` TEXT NOT NULL,
    `video_prw_img` TEXT NOT NULL,
    `date_publish` timestamp NULL,
    `date_unpublish` timestamp NULL,
    `data` text,
    `date_add` datetime NOT NULL,
    `date_upd` datetime NOT NULL,
    PRIMARY KEY (`id_rating`))
    ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;';
$sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'pvr_voucher_assoc` (
    `id_assoc` INT UNSIGNED NOT NULL auto_increment,
    `id_voucher` int(11) NOT NULL DEFAULT 1,
    `id_customer` int(11) NOT NULL DEFAULT 1,
    `id_order` int(11) NOT NULL DEFAULT 1,
    `id_product` int(11) NOT NULL DEFAULT 1,
    `id_rating` int(11) NOT NULL DEFAULT 1,
    `id_shop` int(11) NOT NULL DEFAULT 1,
    `date_add` datetime NOT NULL,
    `date_upd` datetime NOT NULL,
    PRIMARY KEY (`id_assoc`))
    ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;';
foreach ($sql as $query) {
    if (Db::getInstance()->execute($query) == false) {
        return false;
    }
}