View file database/upgrades/20181217200205_replace_name_in_stickers.php

File size: 446B
<?php

use Phinx\Migration\AbstractMigration;

class ReplaceNameInStickers extends AbstractMigration
{
    /**
     * Migrate Up.
     */
    public function up()
    {
        $this->execute("UPDATE stickers SET name = replace(`name`, '/smiles/', '/stickers/')");
    }

    /**
     * Migrate Down.
     */
    public function down()
    {
        $this->execute("UPDATE stickers SET name = replace(`name`, '/stickers/', '/smiles/')");
    }
}