<?php

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

class AddAuthorities extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Authority::query()->firstOrCreate(['name'=>'入库管理-入库','alias_name'=>'入库管理-入库']);
        Authority::query()->firstOrCreate(['name'=>'入库管理-入库-查询','alias_name'=>'入库管理-入库-查询']);

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Authority::query()->where('name','入库管理-入库')->delete();
        Authority::query()->where('name','入库管理-入库-查询')->delete();
    }
}
