id(); $table->bigInteger('station_task_id')->index(); $table->string('station_task_table_type'); $table->bigInteger('station_task_table_id'); $table->index('station_task_table_id','station_task_table_type'); $table->timestamps(); }); Schema::table('station_task_batches', function (Blueprint $table) { $table->dropColumn('station_id'); }); Schema::table('station_task_commodities', function (Blueprint $table) { $table->dropColumn('station_id'); }); Schema::table('station_task_material_boxes', function (Blueprint $table) { $table->dropColumn('station_id'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('station_task_batches', function (Blueprint $table) { $table->integer('station_id')->index(); }); Schema::table('station_task_commodities', function (Blueprint $table) { $table->integer('station_id')->index(); }); Schema::table('station_task_material_boxes', function (Blueprint $table) { $table->integer('station_id')->index(); }); Schema::dropIfExists('station_task_children'); } }