<?php

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

class AddAuthorityDataDeliveryTerminal extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        \App\Authority::query()->firstOrCreate(["name"=>"入库管理-入库预约-入库区终端"],["name"=>"入库管理-入库预约-入库区终端","alias_name"=>"入库管理-入库预约-入库区终端"]);
        \App\Authority::query()->firstOrCreate(["name"=>"入库管理-入库预约-二维码"],["name"=>"入库管理-入库预约-入库区终端","alias_name"=>"入库管理-入库预约-二维码"]);
        \App\Authority::query()->firstOrCreate(["name"=>"入库管理-入库预约-产能维护"],["name"=>"入库管理-入库预约-产能维护","alias_name"=>"入库管理-入库预约-产能维护"]);
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        \App\Authority::query()->whereIn("alias_name",["入库管理-入库预约-入库区终端","入库管理-入库预约-二维码","入库管理-入库预约-产能维护"])->delete();
    }
}
