<?php

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

class ChangeProcessesContentsColumnType extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('processes_contents',function (Blueprint $table){
            $table->dropColumn('is_full');
            $table->enum('type',['原料单','成品单'])->default('原料单')->comment('单据类型');
        });
    }
    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('processes_contents',function (Blueprint $table){
            $table->string('is_full',2)->default('N')->comment('是否成品');
        });
    }
}
