【发布时间】:2016-04-16 13:28:31
【问题描述】:
我刚刚开始使用 laravel 5.2.. 这是一个简单的迁移文件,但是当我运行 php artisan migrate 命令时,我得到了屏幕截图中显示的错误。我现在该怎么办?
迁移文件
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateProductCategoryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('product_category', function (Blueprint $table) {
$table->increments('id');
$table->string('product_category_name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('product_category');
}
}
【问题讨论】:
标签: php laravel database-migration laravel-artisan laravel-5.2