mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
36 lines
886 B
PHP
36 lines
886 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateMilestoneReward extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('milestone_reward', function (Blueprint $table) {
|
|
$table->unsignedBigInteger('milestone_id');
|
|
$table->unsignedBigInteger('reward_id');
|
|
// $table->timestamps();
|
|
|
|
$table->foreign('milestone_id')->references('id')->on('milestones')->onDelete('cascade');
|
|
$table->foreign('reward_id')->references('id')->on('rewards')->onDelete('cascade');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('milestone_reward');
|
|
}
|
|
}
|