|
|
@@ -0,0 +1,31 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use App\Authority;
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
+use Illuminate\Database\Schema\Blueprint;
|
|
|
+use Illuminate\Support\Facades\Schema;
|
|
|
+
|
|
|
+class AddAuthoritiesOrderIssueBatchArchive extends Migration
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * Run the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function up()
|
|
|
+ {
|
|
|
+ if(!Authority::query()->where('name','订单管理-问题件-批量归档')->first()){
|
|
|
+ (new Authority(['name'=>'订单管理-问题件-批量归档','alias_name'=>'订单管理-问题件-批量归档']))->save();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Reverse the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function down()
|
|
|
+ {
|
|
|
+ Authority::query()->where('name','订单管理-问题件-批量归档')->delete();
|
|
|
+ }
|
|
|
+}
|