<?php

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

class CreateMajorInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('major_info', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('year')->nullable()->comment('年份');
            $table->string('class',255)->nullable()->comment('科类');
            $table->string('batch',255)->nullable()->comment('批次');
            $table->string('level',255)->nullable()->comment('层次');
            $table->string('type',255)->nullable()->comment('类别');
            $table->string('college',64)->nullable()->comment('院校名称');
            $table->string('province',64)->nullable()->comment('省份');
            $table->string('city',64)->nullable()->comment('城市');
            $table->string('major',100)->nullable()->comment('专业名称');
            $table->integer('max_grade')->nullable()->comment('最高分');
            $table->integer('min_grade')->nullable()->comment('最低分');
            $table->integer('avg_grade')->nullable()->comment('平均分');
            $table->integer('batch_grade')->nullable()->comment('批次线');
            $table->integer('miss_grade')->nullable()->comment('线差');
            $table->integer('max_rank')->nullable()->comment('最高位次');
            $table->integer('min_rank')->nullable()->comment('最低位次');
            $table->integer('avg_rank')->nullable()->comment('平均位次');
            $table->string('comment',255)->nullable()->comment('备注');
            $table->softDeletes();
            $table->timestamps();
        });
    }

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