how to seed in Yii?
问题 I'm wondering how one can seed in Yii a table once it is created with migration? I've got a migration with an up-method: public function up() { $this->createTable('users',array('id'=>"pk", 'login'=>'string NOT NULL')); echo "table 'users' is created.\n"; return true; } I've got as well corresponding Users model and its CRUD actions . When I try to execute another migration with an up-method public function up() { $user = new Users; $user->login = "Bob"; return $user->save(); } I get the