<?php

use Gls\GlsPoland\Configuration\Adapter\Configuration;
use Gls\GlsPoland\PrestaShop\Installer\DatabaseInstaller;
use Gls\GlsPoland\PrestaShop\Installer\Migration\Version1_2_0;

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

function upgrade_module_1_2_0(Module $module): bool
{
    $databaseInstaller = new DatabaseInstaller(
        $module->get('database_connection'),
        [Version1_2_0::create()],
        new Configuration(true)
    );
    $databaseInstaller->install($module);

    return true;
}
