View file database/upgrades/20170505114152_change_time_in_rules.php

File size: 478B
<?php

use Phinx\Migration\AbstractMigration;

class ChangeTimeInRules extends AbstractMigration
{
    /**
     * Migrate Up.
     */
    public function up()
    {
        $table = $this->table('rules');

        $table->renameColumn('time', 'created_at')
            ->save();
    }

    /**
     * Migrate Down.
     */
    public function down()
    {
        $table = $this->table('rules');

        $table->renameColumn('created_at', 'time')
            ->save();
    }
}