Create incident_components table

This commit is contained in:
James Brooks
2017-07-18 22:52:49 +01:00
parent 964eaa3ce0
commit 7bfba072bb
3 changed files with 149 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateIncidentComponents extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('incident_components', function (Blueprint $table) {
$table->increments('id');
$table->integer('incident_id')->unsigned()->index();
$table->integer('component_id')->unsigned()->index();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('incident_components');
}
}