public function down()
 {
     $this->dropForeignKey('fk_message_source_message', Message::tableName());
     $this->dropTable(Message::tableName());
     $this->dropTable(SourceMessage::tableName());
     return true;
 }
Esempio n. 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getSource()
 {
     return $this->hasOne(SourceMessage::className(), ['id' => 'id'])->from(['source' => SourceMessage::tableName()]);
 }