Skip to content

Commit

Permalink
added new table and upgraded to 4.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
margud committed Aug 21, 2019
1 parent 5ac9b8a commit fb5bd9f
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mollie.php
Expand Up @@ -267,7 +267,7 @@ public function __construct()
{
$this->name = 'mollie';
$this->tab = 'payments_gateways';
$this->version = '3.4.2';
$this->version = '3.4.3';
$this->author = 'Mollie B.V.';
$this->need_instance = 1;
$this->bootstrap = true;
Expand Down
57 changes: 57 additions & 0 deletions upgrade/Upgrade-3.4.3.php
@@ -0,0 +1,57 @@
<?php
/**
* Copyright (c) 2012-2019, Mollie B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* @author Mollie B.V. <info@mollie.nl>
* @copyright Mollie B.V.
* @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
* @category Mollie
* @package Mollie
* @link https://www.mollie.nl
*/

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

/**
* @return bool
*
* @throws PrestaShopDatabaseException
* @throws PrestaShopException
*/
function upgrade_module_3_4_3()
{
$query = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'mol_country` (
`id_mol_country` INT(64) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`id_method` VARCHAR(64),
`id_country` INT(64),
`all_countries` tinyint
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';

if (!Db::getInstance()->execute($query)) {
return false;
}
}

0 comments on commit fb5bd9f

Please sign in to comment.