我使用的是Laravel 5.2、Php7、Apache和Windows。
我的迁移文件名为“2016_03_30_095234_alter_date_update_news_table.php”。
class AddSlugUpdateNewsTable extends Migration
{
/**
* Run the migrations.
* php artisan make:migration add_slug_update_news_table
* @return void
*/
public function up()
{
Schema::table('news', function (Blueprint $table) {
$table->date('slug')->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('news', function (Blueprint $table) {
$table->dateTime('slug')->change();
});
}
}
但是在运行迁移后,
$\> php artisan migrate
给我返回了这个错误!
[RuntimeException] 更改“news”表的列需要Doctrine DBAL。请安装“doctrine / dbal”。
我该怎么办?