for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use yii\db\Migration;
class m000000_000000_api_user extends Migration
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
/**
* @inheritdoc
*/
public function safeUp()
$this->createTable('user', [
'id' => $this->primaryKey(),
'email' => $this->string(255)->notNull(),
'username' => $this->string(255)->notNull(),
'password' => $this->string(255)->notNull(),
'verified' => $this->integer()->defaultValue(0),
'otp_secret' => $this->string(600),
'otp_enabled' => $this->integer()->defaultValue(0),
'created_at' => $this->integer(),
'updated_at' => $this->integer()
]);
$this->createIndex('user__email_unique_index', 'user', ['email'], true);
$this->createIndex('user__username_unique_index', 'user', ['username'], true);
}
public function safeDown()
$this->dropTable('user');
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.