|
|
@@ -0,0 +1,30 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use App\StationType;
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
+use Illuminate\Database\Schema\Blueprint;
|
|
|
+use Illuminate\Support\Facades\Schema;
|
|
|
+
|
|
|
+class CreateStationTypes2Table extends Migration
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * Run the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function up()
|
|
|
+ {
|
|
|
+ StationType::query()->firstOrCreate(['name'=>'立库']);
|
|
|
+ StationType::query()->firstOrCreate(['name'=>'缓存架']);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Reverse the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function down()
|
|
|
+ {
|
|
|
+ StationType::query()->whereIn('name',['立库','缓存架'])->delete();
|
|
|
+ }
|
|
|
+}
|