我想知道一个mysql表是否可以有两个FK列,并且在另一个表中对同一个PK进行预测,如下所示:
表对话:
$table->increments('con_id');
$table->string('subject', 45);
$table->integer('sender_id')->unsigned()->index();
$table->integer('recipient_id')->unsigned()->index();
$table->foreign('sender_id')->references('user_id')->on('users')->onDelete('cascade');
$table->foreign('recipient_id')->references('user_id')->on('users')->onDelete('cascade');