Просмотр файла database/upgrades/20200406125053_add_visits_to_topics.php

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

use Phinx\Migration\AbstractMigration;

class AddVisitsToTopics extends AbstractMigration
{
    /**
     * Migrate Change.
     */
    public function change(): void
    {
        $table = $this->table('topics');
        $table->addColumn('visits', 'integer', ['default' => 0, 'after' => 'count_posts'])
            ->update();
    }
}