edms/database/migrations/2021_03_08_060432_create_ab...

35 lines
754 B
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAbsentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('absents', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id')->default(0);
$table->date('start_date')->nullable();
$table->date('end_date')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('absents');
}
}