datatable.directory codebase
https://datatable.directory/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
924 B
38 lines
924 B
6 years ago
|
<?php
|
||
|
|
||
|
use Illuminate\Support\Facades\Schema;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
|
||
6 years ago
|
class CreateRevisionProposalPivotTable extends Migration
|
||
6 years ago
|
{
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
6 years ago
|
Schema::create('revision_proposal_pivot', function (Blueprint $table) {
|
||
6 years ago
|
$table->unsignedInteger('proposal_id')->index();
|
||
6 years ago
|
$table->unsignedInteger('revision_id')->index();
|
||
6 years ago
|
|
||
|
$table->foreign('proposal_id')->references('id')->on('proposals')
|
||
|
->onDelete('cascade');
|
||
|
|
||
6 years ago
|
$table->foreign('revision_id')->references('id')->on('revisions')
|
||
6 years ago
|
->onDelete('cascade');
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
6 years ago
|
Schema::dropIfExists('revision_proposal_pivot');
|
||
6 years ago
|
}
|
||
|
}
|