Files
cachet-docker/app/database/migrations/2014_11_16_224937_CreateComponentsTable.php
2014-11-16 23:31:50 +00:00

38 lines
639 B
PHP

<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
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', 1)->default(1);
$table->timestamps();
$table->index('status');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('components');
}
}