parent
7493d3e176
commit
8efa08b1cc
@ -1,37 +0,0 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Support\Facades\Schema; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Database\Migrations\Migration; |
||||
|
||||
class CreateProposalRemoveRowPivotTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('proposal_remove_row_pivot', function (Blueprint $table) { |
||||
$table->unsignedInteger('proposal_id')->index(); |
||||
$table->unsignedInteger('row_id')->index(); |
||||
|
||||
$table->foreign('proposal_id')->references('id')->on('proposals') |
||||
->onDelete('cascade'); |
||||
|
||||
$table->foreign('row_id')->references('id')->on('rows') |
||||
->onDelete('cascade'); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('proposal_remove_row_pivot'); |
||||
} |
||||
} |
@ -1,37 +0,0 @@ |
||||
<?php |
||||
|
||||
use Illuminate\Support\Facades\Schema; |
||||
use Illuminate\Database\Schema\Blueprint; |
||||
use Illuminate\Database\Migrations\Migration; |
||||
|
||||
class CreateProposalAddRowPivotTable extends Migration |
||||
{ |
||||
/** |
||||
* Run the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
Schema::create('proposal_add_row_pivot', function (Blueprint $table) { |
||||
$table->unsignedInteger('proposal_id')->index(); |
||||
$table->unsignedInteger('row_id')->index(); |
||||
|
||||
$table->foreign('proposal_id')->references('id')->on('proposals') |
||||
->onDelete('cascade'); |
||||
|
||||
$table->foreign('row_id')->references('id')->on('rows') |
||||
->onDelete('cascade'); |
||||
}); |
||||
} |
||||
|
||||
/** |
||||
* Reverse the migrations. |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
Schema::dropIfExists('proposal_add_row_pivot'); |
||||
} |
||||
} |
Loading…
Reference in new issue