edms/database/migrations/2021_03_08_064825_create_de...

36 lines
839 B
PHP
Raw Normal View History

2022-06-06 05:07:54 +00:00
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDepartmentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('departments', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('parent_id')->default(0);
$table->longText('name');
$table->unsignedTinyInteger('status')->default(0);
$table->unsignedInteger('responsible_user_id')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('departments');
}
}