id(); $table->bigInteger('station_task_id')->index(); $table->string('station_taskable_type'); $table->bigInteger('station_taskable_id'); $table->index(['station_taskable_type','station_taskable_id'],'station_taskable_t_i'); $table->timestamps(); }); Schema::table('station_tasks', function (Blueprint $table) { $table->dropColumn('station_taskable_type'); $table->dropColumn('station_taskable_id'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('station_task_children'); Schema::table('station_tasks', function (Blueprint $table) { $table->string('station_taskable_type'); $table->integer('station_taskable_id'); $table->index(['station_taskable_id','station_taskable_id'],'station_taskable_type'); }); } }