<?php
/**
 * @copyright Copyright (C) 2015-2017 AIZAWA Hina
 * @license https://github.com/fetus-hina/stat.ink/blob/master/LICENSE MIT
 * @author AIZAWA Hina <hina@bouhime.com>
 */

use app\components\db\Migration;

class m171103_185043_gear2 extends Migration
{
    public function safeUp()
    {
        foreach ($this->getData() as $d) {
            $this->update('gear2', ['key' => $d[1]], ['key' => $d[0]]);
        }
    }

    public function safeDown()
    {
        foreach ($this->getData() as $d) {
            $this->update('gear2', ['key' => $d[0]], ['key' => $d[1]]);
        }
    }

    public function getData() : array
    {
        return [
            ['baby_jelly_shirt_tie', 'baby_jelly_shirt_and_tie'],
            ['shirt_tie', 'shirt_and_tie'],
            ['blue_black_squidkid_iv', 'blue_and_black_squidkid_iv'],
            ['red_black_squidkid_iv', 'red_and_black_squidkid_iv'],
        ];
    }
}

Update gear keys (have "&")
Update gear keys (have "&")

Signed-off-by: AIZAWA Hina <07c779d48779c322a7c5324109202f9012f7aebf@bouhime.com>
