luyadev/luya-module-news

View on GitHub
src/admin/migrations/m220406_151512_link_and_author_fields.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
<?php

use yii\db\Migration;

class m220406_151512_link_and_author_fields extends Migration
{
    public function safeUp()
    {
        $this->addColumn('news_article', 'author', $this->string());
        $this->addColumn('news_article', 'link', $this->text());
    }

    public function safeDown()
    {
        $this->dropColumn('news_article', 'author');
        $this->dropColumn('news_article', 'link');
    }
}