39 lines
927 B
PHP
39 lines
927 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
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');
|
|
}
|
|
}
|