<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateReporteTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('gtv_reporte', function (Blueprint $table) {
            $table->engine = "InnoDB";
            $table->charset = 'utf8';
            $table->collation = 'utf8_unicode_ci';
            $table->increments('id_rep')->unsigned();
            $table->integer('num_rep');
            $table->text('resumenact_rep');
            $table->integer('hrs_rep');
            $table->integer('hrsacum_rep');
            $table->date('deldia_rep');
            $table->date('aldia_rep');
            $table->string('firma_rep');
            $table->integer('id_alu')->unsigned();
            $table->foreign('id_alu')->references('id_alu')->on('gtv_alumno')->onDelete('restrict')->onUpdate('cascade');
            $table->integer('status_rep');
            $table->timestamps();
        });
    }

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