我知道如何向数据库中添加列/字段,例如:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddStatusToPhoto extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('photos', function(Blueprint $table)
{
$table->integer('status');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
但是它将追加到表的最后一个字段,我希望添加到特定的列,例如在created_at之后插入字段,是否有可能实现?