Answer the question
In order to leave comments, you need to log in
Exception 'yii\base\InvalidConfigException' with message 'Failed to instantiate component or class "m190621_173618_create_article_table".' what to do?
<?php
use yii\db\Migration;
/**
* Handles the creation of table `article`.
*/
class m170124_021553_create_article_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('article', [
'id' => $this->primaryKey(),
'title'=>$this->string(),
'description'=>$this->text(),
'content'=>$this->text(),
'date'=>$this->date(),
'image'=>$this->string(),
'viewed'=>$this->integer(),
'user_id'=>$this->integer(),
'status'=>$this->integer(),
'category_id'=>$this->integer(),
]);
}
/**
* @inheritdoc
*/
public function down()
{
$this->dropTable('article');
}
}
Answer the question
In order to leave comments, you need to log in
What to do? Be careful! You have different class name and migration file name: m190621_173618 !== m170124_021553
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question