<?php

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

class CreateProcessMethodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * 二次加工类型
     *
     * @return void
     */
    public function up()
    {
        Schema::create('process_methods', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name');
            $table->timestamps();
        });
        $processMethods=['贴标','撕标','全检','组套','拆套','喷码','其他'];
        for ($i=0;$i<count($processMethods);$i++){
            \App\ProcessMethod::create([
                'name'=>$processMethods[$i]
            ]);
        }
    }

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