Просмотр файла database/upgrades/20170622105414_delete_secquest_in_users.php

Размер файла: 646B
<?php

use Phinx\Migration\AbstractMigration;

class DeleteSecquestInUsers extends AbstractMigration
{
    /**
     * Migrate Up.
     */
    public function up()
    {
        $table = $this->table('users');
        $table
            ->removeColumn('secquest')
            ->removeColumn('secanswer')
            ->save();
    }

    /**
     * Migrate Down.
     */
    public function down()
    {
        $table = $this->table('users');
        $table
            ->addColumn('secquest', 'string', ['limit' => 50, 'null' => true])
            ->addColumn('secanswer', 'string', ['limit' => 40, 'null' => true])
            ->save();
    }
}