View file database/upgrades/20200127013511_change_theme_in_users.php

File size: 449B
<?php

use Phinx\Migration\AbstractMigration;

class ChangeThemeInUsers extends AbstractMigration
{
    /**
     * Migrate Up.
     */
    public function up(): void
    {
        $this->execute("UPDATE users SET themes='mobile' WHERE themes='default';");
        $this->execute("UPDATE users SET themes='default' WHERE themes NOT IN('mobile', 'motor');");
    }

    /**
     * Migrate Down.
     */
    public function down(): void
    {

    }
}