View file database/upgrades/20170121155127_add_topic_id_to_vote.php

File size: 416B
<?php

use Phinx\Migration\AbstractMigration;
use Phinx\Db\Adapter\MysqlAdapter;

class AddTopicIdToVote extends AbstractMigration
{
    /**
     * Migrate Change.
     */
    public function change()
    {
        $table = $this->table('vote');
        $table->addColumn('topic_id', 'integer', [
            'limit' => MysqlAdapter::INT_MEDIUM,
            'default' => 0
        ])
            ->update();
    }
}