Files
monica/database/migrations/2016_06_28_191025_create_tasks_table.php
T
2017-02-16 19:21:44 -05:00

38 lines
888 B
PHP

<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTasksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tasks', function (Blueprint $table) {
$table->increments('id');
$table->integer('account_id');
$table->integer('people_id');
$table->string('title');
$table->longText('description')->nullable();
$table->enum('status', ['completed', 'inprogress', 'archived']);
$table->dateTime('completed_at')->nullable();
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('tasks');
}
}