<?php
/**
* 2013-2018 Ovidiu Cimpean
*
* Ovidiu Cimpean - Newsletter Pro © All rights reserved.
*
* DISCLAIMER
*
* Do not edit, modify or copy this file.
* If you wish to customize it, contact us at addons4prestashop@gmail.com.
*
* @author    Ovidiu Cimpean <addons4prestashop@gmail.com>
* @copyright 2013-2018 Ovidiu Cimpean
* @license   Do not edit, modify or copy this file
* @version   Release: 4
*/

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

function upgrade_module_4_5_5($module)
{
	$upgrade = $module->upgrade;

	$upgrade->updateConfiguration('SHOW_CLEAR_CACHE', 1);

	$upgrade->createTable('newsletter_pro_subscription_consent', "
		`id_newsletter_pro_subscription_consent` int(11) unsigned NOT NULL AUTO_INCREMENT,
		`email` varchar(32) NOT NULL DEFAULT '',
		`subscribed` int(2) NOT NULL DEFAULT 0,
		`ip_address` varchar(32) NOT NULL,
		`url` text DEFAULT NULL,
		`http_referer` text DEFAULT NULL,
		`consent_date` datetime DEFAULT NULL,
		`date_add` datetime DEFAULT NULL,
		`date_upd` datetime DEFAULT NULL,
		PRIMARY KEY (`id_newsletter_pro_subscription_consent`)
	");

	return $upgrade->success();
}
