|
|
@@ -0,0 +1,35 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use App\Authority;
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
+
|
|
|
+class AddAuthorityToRejected extends Migration
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * Run the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function up()
|
|
|
+ {
|
|
|
+ if(!Authority::query()->where('alias_name','退货管理-客户不可见')->exists()){
|
|
|
+ Authority::query()->create([
|
|
|
+ 'name' => '退货管理-客户不可见',
|
|
|
+ 'alias_name' => '退货管理-客户不可见',
|
|
|
+ 'permission' => '禁止',
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Reverse the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function down()
|
|
|
+ {
|
|
|
+ if(Authority::query()->where('alias_name','退货管理-客户不可见')->exists()){
|
|
|
+ Authority::query()->where('alias_name' ,'退货管理-客户不可见')->delete();
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|