app/DoctrineMigrations/Version20241023101344.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20241023101344 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // 1 of 1: UPDATE `plg_zeus_payment_config`.
  18.         $env_params = [
  19.             'default' => [
  20.                 'id' => 1,
  21.                 // 'credit_payment_id' => NULL,
  22.                 'cvs_payment_id' => NULL,
  23.                 'edy_payment_id' => NULL,
  24.                 'ebank_payment_id' => NULL,
  25.                 'clientip' => NULL,
  26.                 'clientauthkey' => NULL,
  27.                 'cvvflg' => NULL,
  28.                 'quickchargeflg' => NULL,
  29.                 'saletype' => 0,
  30.                 'secure3dflg' => NULL,
  31.                 'detailname' => NULL,
  32.                 'clientip_cvs' => NULL,
  33.                 'siteurl' => NULL,
  34.                 'sitestr' => NULL,
  35.                 'clientip_edy' => NULL,
  36.                 'success_url' => NULL,
  37.                 'success_str' => NULL,
  38.                 'failure_url' => NULL,
  39.                 'failure_str' => NULL,
  40.                 'clientip_ebank' => NULL,
  41.                 'ebank_siteurl' => NULL,
  42.                 'ebank_sitestr' => NULL,
  43.                 'cvs_key' => NULL,
  44.                 'edy_key' => NULL,
  45.                 'ebank_key' => NULL,
  46.             ],
  47.             'prod' => [
  48.                 'credit_payment_id' => 5,
  49.                 'clientip' => '31662',
  50.                 'clientauthkey' => '843CE23498251E784FCEC6BE4183F9439BB32067',
  51.                 'cvvflg' => 4,
  52.                 'quickchargeflg' => 1,
  53.                 'saletype' => 0,
  54.                 'secure3dflg' => 0,
  55.                 'detailname' => 'Uniform Town',
  56.             ],
  57.             'dev' => [
  58.                 'credit_payment_id' => 5,
  59.                 'clientip' => '2019001640',
  60.                 'clientauthkey' => '370ae87be6e873947d84fe8a10f0bd03837c0f45',
  61.                 'cvvflg' => 4,
  62.                 'quickchargeflg' => 1,
  63.                 'saletype' => 0,
  64.                 'secure3dflg' => 0,
  65.                 'detailname' => 'Uniform Town(テスト)',
  66.             ],
  67.         ];
  68.         $params array_merge($env_params['default'], $env_params[env('APP_ENV')]);
  69.         $sql "INSERT INTO `plg_zeus_payment_config` (
  70.                     `id`
  71.                 ,   `credit_payment_id`
  72.                 ,   `cvs_payment_id`
  73.                 ,   `edy_payment_id`
  74.                 ,   `ebank_payment_id`
  75.                 ,   `clientip`
  76.                 ,   `clientauthkey`
  77.                 ,   `cvvflg`
  78.                 ,   `quickchargeflg`
  79.                 ,   `saletype`
  80.                 ,   `secure3dflg`
  81.                 ,   `detailname`
  82.                 ,   `clientip_cvs`
  83.                 ,   `siteurl`
  84.                 ,   `sitestr`
  85.                 ,   `clientip_edy`
  86.                 ,   `success_url`
  87.                 ,   `success_str`
  88.                 ,   `failure_url`
  89.                 ,   `failure_str`
  90.                 ,   `clientip_ebank`
  91.                 ,   `ebank_siteurl`
  92.                 ,   `ebank_sitestr`
  93.                 ,   `cvs_key`
  94.                 ,   `edy_key`
  95.                 ,   `ebank_key`
  96.                 ) VALUES (
  97.                     :id
  98.                 ,   :credit_payment_id
  99.                 ,   :cvs_payment_id
  100.                 ,   :edy_payment_id
  101.                 ,   :ebank_payment_id
  102.                 ,   :clientip
  103.                 ,   :clientauthkey
  104.                 ,   :cvvflg
  105.                 ,   :quickchargeflg
  106.                 ,   :saletype
  107.                 ,   :secure3dflg
  108.                 ,   :detailname
  109.                 ,   :clientip_cvs
  110.                 ,   :siteurl
  111.                 ,   :sitestr
  112.                 ,   :clientip_edy
  113.                 ,   :success_url
  114.                 ,   :success_str
  115.                 ,   :failure_url
  116.                 ,   :failure_str
  117.                 ,   :clientip_ebank
  118.                 ,   :ebank_siteurl
  119.                 ,   :ebank_sitestr
  120.                 ,   :cvs_key
  121.                 ,   :edy_key
  122.                 ,   :ebank_key
  123.                 )
  124.                 ON DUPLICATE KEY UPDATE
  125.                     `credit_payment_id` = VALUES( `credit_payment_id` )
  126.                 ,   `clientip` = VALUES( `clientip` )
  127.                 ,   `clientauthkey` = VALUES( `clientauthkey` )
  128.                 ,   `cvvflg` = VALUES( `cvvflg` )
  129.                 ,   `quickchargeflg` = VALUES( `quickchargeflg` )
  130.                 ,   `saletype` = VALUES( `saletype` )
  131.                 ,   `secure3dflg` = VALUES( `secure3dflg` )
  132.                 ,   `detailname` = VALUES( `detailname` )";
  133.         $this->addSql($sql$params);
  134.     }
  135.     public function down(Schema $schema): void
  136.     {
  137.         // this down() migration is auto-generated, please modify it to your needs
  138.     }
  139. }