bigInteger('account_id'); $table->integer('site_id')->nullable(); $table->integer('external_integration_id')->unsigned(); $table->string('link'); $table->foreign('site_id')->references('id')->on('ab_setup'); $table->foreign('external_integration_id')->references('id')->on('external_integrations'); $table->foreign('account_id')->references('id')->on('ab_account'); $table->unique(['site_id','account_id','external_integration_id'],'sae'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('external_account'); } }