addColumn('user', 'type', $this->smallInteger()); $this->addColumn('user_info', 'image', $this->string()); $this->addColumn('user_info', 'poster', $this->string()); $this->addColumn('user_info', 'member', $this->smallInteger()); $this->createTable('{{%company_info}}', [ 'company_info_id' => $this->primaryKey(), 'name' => $this->string(255)->notNull(), 'staff' => $this->integer(), 'street' => $this->string(255), 'house' => $this->string(255), 'hide_mail' => $this->smallInteger(), 'user_id' => $this->integer(), ], null); } public function down() { $this->dropColumn('user', 'type'); $this->dropColumn('user_info', 'image'); $this->dropColumn('user_info', 'poster'); $this->dropColumn('user_info', 'member'); $this->dropTable('company_info'); } }