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/m170120_000000_schema_cleanup.php
<?php

namespace craft\migrations;

use craft\db\Migration;
use craft\db\Table;
use craft\helpers\MigrationHelper;

/**
 * m170120_000000_schema_cleanup migration.
 */
class m170120_000000_schema_cleanup extends Migration
{
    /**
     * @inheritdoc
     */
    public function safeUp()
    {
        if (!MigrationHelper::doesForeignKeyExist(Table::TAGGROUPS, 'fieldLayoutId')) {
            $this->addForeignKey(null, Table::TAGGROUPS, ['fieldLayoutId'], Table::FIELDLAYOUTS, ['id'], 'SET NULL', null);
        }

        $this->alterColumn(Table::ENTRYVERSIONS, 'notes', $this->text());
        $this->alterColumn(Table::ASSETINDEXDATA, 'uri', $this->text());

        return true;
    }

    /**
     * @inheritdoc
     */
    public function safeDown()
    {
        echo "m170120_000000_schema_cleanup cannot be reverted.\n";

        return false;
    }
}