I created a migration for the authors table.
public function up()
{
$this->createTable('authors', [
'id' => $this->primaryKey(),
'name' => $this->string()->notNull()
]);
}
public function down()
{
$this->dropTable('authors');
}
After migrating a table,I wanted to make a model for the migration. so Tried creating a model using the gii and this is what i got.

The table authors has already been created by the migration,but the gii model generator still says Table 'authors' does not exist. Is there anything else that i am missing?
This is my db.php file
<?php
return [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=myFirstYii',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
// Schema cache options (for production environment)
//'enableSchemaCache' => true,
//'schemaCacheDuration' => 60,
//'schemaCache' => 'cache',
];