Просмотр файла database/upgrades/20170827155514_delete_credit_in_users.php

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

use Phinx\Migration\AbstractMigration;

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

    /**
     * Migrate Down.
     */
    public function down()
    {
        $table = $this->table('users');
        $table
            ->addColumn('timecredit', 'integer', ['default' => 0])
            ->addColumn('sumcredit', 'integer', ['default' => 0])
            ->save();
    }
}