Files
cachet-docker/app/database/migrations/2014_11_16_224937_CreateComponentsTable.php
2015-01-01 13:53:31 +00:00

37 lines
792 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateComponentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('components', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('description')->nullable()->default(null);
$table->tinyInteger('status')->default(1);
$table->timestamps();
$table->index('status');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('components');
}
}