<?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->unsignedBigInteger('id')->primary();
            $table->string('name');
        });

        DB::table('departments')->insert(
            array(
                array('id' => '0','name' => 'default'),
                array('id' => '1','name' => 'BIOL'),
                array('id' => '4','name' => 'CIAM'),
                array('id' => '2','name' => 'FISI'),
                array('id' => '3','name' => 'MATE'),
                array('id' => '5','name' => 'PGCN'),
                array('id' => '6','name' => 'QUIM')
            ));
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('departments');
    }
}
