MOON
Server: Apache
System: Linux res.emeff.ca 3.10.0-962.3.2.lve1.5.24.10.el7.x86_64 #1 SMP Wed Mar 20 07:36:02 EDT 2019 x86_64
User: accemeff (1004)
PHP: 7.0.33
Disabled: NONE
Upload Files
File: /home/accemeff/vendor/craftcms/cms/src/migrations/m170630_161028_deprecation_changes.php
<?php

namespace craft\migrations;

use craft\db\Migration;
use craft\db\Table;
use yii\db\Expression;

/**
 * m170630_161028_deprecation_changes migration.
 */
class m170630_161028_deprecation_changes extends Migration
{
    /**
     * @inheritdoc
     */
    public function safeUp()
    {
        // Copy this from m170821_180624_deprecation_line_nullable in case any template lines are null
        $this->alterColumn(Table::DEPRECATIONERRORS, 'line', $this->smallInteger()->unsigned());

        $this->update(Table::DEPRECATIONERRORS, [
            'file' => new Expression('[[template]]'),
            'line' => new Expression('[[templateLine]]')
        ], ['not', ['template' => null]]);

        $this->dropColumn(Table::DEPRECATIONERRORS, 'class');
        $this->dropColumn(Table::DEPRECATIONERRORS, 'method');
        $this->dropColumn(Table::DEPRECATIONERRORS, 'template');
        $this->dropColumn(Table::DEPRECATIONERRORS, 'templateLine');
    }

    /**
     * @inheritdoc
     */
    public function safeDown()
    {
        echo "m170630_161028_deprecation_changes cannot be reverted.\n";
        return false;
    }
}