Просмотр файла database/upgrades/20180706184108_remove_hours_and_days_from_counters.php

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

use Phinx\Migration\AbstractMigration;

class RemoveHoursAndDaysFromCounters extends AbstractMigration
{
    /**
     * Migrate Up.
     */
    public function up()
    {
        $table = $this->table('counters');
        $table->removeColumn('hours')
            ->removeColumn('days')
            ->update();
    }

    /**
     * Migrate Down.
     */
    public function down()
    {
        $table = $this->table('counters');
        $table->addColumn('hours', 'integer')
            ->addColumn('days', 'integer')
            ->save();
    }
}