瀏覽代碼

Add new migration

Daniel Supernault 6 年之前
父節點
當前提交
16399e93fb
共有 1 個文件被更改,包括 33 次插入0 次删除
  1. 33 0
      database/migrations/2018_09_10_024252_update_import_datas_table.php

+ 33 - 0
database/migrations/2018_09_10_024252_update_import_datas_table.php

@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class UpdateImportDatasTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('import_datas', function (Blueprint $table) {
+            $table->bigInteger('job_id')->unsigned()->nullable()->after('profile_id');
+            $table->string('original_name')->nullable()->after('stage');
+            $table->boolean('import_accepted')->default(false)->nullable()->after('original_name');
+            $table->unique(['job_id', 'original_name']);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        //
+    }
+}