<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20241023101344 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// 1 of 1: UPDATE `plg_zeus_payment_config`.
$env_params = [
'default' => [
'id' => 1,
// 'credit_payment_id' => NULL,
'cvs_payment_id' => NULL,
'edy_payment_id' => NULL,
'ebank_payment_id' => NULL,
'clientip' => NULL,
'clientauthkey' => NULL,
'cvvflg' => NULL,
'quickchargeflg' => NULL,
'saletype' => 0,
'secure3dflg' => NULL,
'detailname' => NULL,
'clientip_cvs' => NULL,
'siteurl' => NULL,
'sitestr' => NULL,
'clientip_edy' => NULL,
'success_url' => NULL,
'success_str' => NULL,
'failure_url' => NULL,
'failure_str' => NULL,
'clientip_ebank' => NULL,
'ebank_siteurl' => NULL,
'ebank_sitestr' => NULL,
'cvs_key' => NULL,
'edy_key' => NULL,
'ebank_key' => NULL,
],
'prod' => [
'credit_payment_id' => 5,
'clientip' => '31662',
'clientauthkey' => '843CE23498251E784FCEC6BE4183F9439BB32067',
'cvvflg' => 4,
'quickchargeflg' => 1,
'saletype' => 0,
'secure3dflg' => 0,
'detailname' => 'Uniform Town',
],
'dev' => [
'credit_payment_id' => 5,
'clientip' => '2019001640',
'clientauthkey' => '370ae87be6e873947d84fe8a10f0bd03837c0f45',
'cvvflg' => 4,
'quickchargeflg' => 1,
'saletype' => 0,
'secure3dflg' => 0,
'detailname' => 'Uniform Town(テスト)',
],
];
$params = array_merge($env_params['default'], $env_params[env('APP_ENV')]);
$sql = "INSERT INTO `plg_zeus_payment_config` (
`id`
, `credit_payment_id`
, `cvs_payment_id`
, `edy_payment_id`
, `ebank_payment_id`
, `clientip`
, `clientauthkey`
, `cvvflg`
, `quickchargeflg`
, `saletype`
, `secure3dflg`
, `detailname`
, `clientip_cvs`
, `siteurl`
, `sitestr`
, `clientip_edy`
, `success_url`
, `success_str`
, `failure_url`
, `failure_str`
, `clientip_ebank`
, `ebank_siteurl`
, `ebank_sitestr`
, `cvs_key`
, `edy_key`
, `ebank_key`
) VALUES (
:id
, :credit_payment_id
, :cvs_payment_id
, :edy_payment_id
, :ebank_payment_id
, :clientip
, :clientauthkey
, :cvvflg
, :quickchargeflg
, :saletype
, :secure3dflg
, :detailname
, :clientip_cvs
, :siteurl
, :sitestr
, :clientip_edy
, :success_url
, :success_str
, :failure_url
, :failure_str
, :clientip_ebank
, :ebank_siteurl
, :ebank_sitestr
, :cvs_key
, :edy_key
, :ebank_key
)
ON DUPLICATE KEY UPDATE
`credit_payment_id` = VALUES( `credit_payment_id` )
, `clientip` = VALUES( `clientip` )
, `clientauthkey` = VALUES( `clientauthkey` )
, `cvvflg` = VALUES( `cvvflg` )
, `quickchargeflg` = VALUES( `quickchargeflg` )
, `saletype` = VALUES( `saletype` )
, `secure3dflg` = VALUES( `secure3dflg` )
, `detailname` = VALUES( `detailname` )";
$this->addSql($sql, $params);
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
}
}