create user table in database defined in db component:
CREATE TABLE `user` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`login` VARCHAR(100) NOT NULL,
`password_hash` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `login` (`login`) USING BTREE,
) COLLATE='utf8mb4_unicode_ci' ENGINE=InnoDB;
2 Create model
<?php
namespace app\models;
use yii\db\ActiveRecord;
/**
* User model.
*
* @property int $id
* @property string $login
* @property string $password_hash
*/
class User extends ActiveRecord
{
public static function tableName()
{
return '{{user}}';
}
}
What is the expected result?
No missed columns/attributes - they declared as @property.
What do you get instead?
Plugin generate "missed attributes" error and try to import attributes from table with same name, but in mysql(not db database).
Plugin add @property tags:
What steps will reproduce the problem?
user
table in database defined indb
component:2 Create model
What is the expected result?
No missed columns/attributes - they declared as
@property
.What do you get instead?
Plugin generate "missed attributes" error and try to import attributes from table with same name, but in
mysql
(notdb
database). Plugin add@property
tags:Additional info