Просмотр файла database/upgrades/20180121180501_change_edit_user_id_in_chat.php

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

use Phinx\Migration\AbstractMigration;

class ChangeEditUserIdInChat extends AbstractMigration
{
    /**
     * Migrate Up.
     */
    public function up()
    {
        $table = $this->table('chat');
        $table->changeColumn('edit_user_id', 'integer', ['null' => true])
            ->changeColumn('created_at', 'integer', ['null' => true])
            ->changeColumn('updated_at', 'integer', ['null' => true])
            ->save();
    }

    /**
     * Migrate Down.
     */
    public function down()
    {
        $table = $this->table('chat');
        $table
            ->changeColumn('edit_user_id', 'integer')
            ->changeColumn('created_at', 'integer')
            ->changeColumn('updated_at', 'integer')
            ->save();
    }
}