Php工匠迁移:刷新不起作用

时间:2016-05-20 22:19:45

标签: laravel

enter image description here

这是用户迁移代码:

public function up()
{
    Schema::create('users', function (Blueprint $table) {
        $table->increments('id');
        $table->string('nickname')->unique();
        $table->string('email')->unique();
        $table->string('password', 60);
        $table->string('pic_url')->nullable();
        $table->string('language')->default('en');
        $table->string('mobile_phone')->nullable();
        $table->string('work_phone')->nullable();
        $table->string('website')->nullable();
        $table->string('twitter')->nullable();
        $table->string('facebook')->nullable();
        $table->string('description')->nullable();
        $table->string('time_zone')->nullable();
        $table->integer('rate_val')->nullable();
        $table->integer('rate_count')->nullable();
        $table->enum('role', array_keys(trans('globals.roles')))->default('person');
        $table->enum('type', array_keys(trans('globals.type_user')))->default('normal');
        $table->enum('verified', array_keys(trans('globals.verification')))->default('no');
        $table->json('preferences')->nullable();
        $table->rememberToken();
        $table->timestamps();
        $table->timestamp('disabled_at')->nullable();
        $table->softDeletes();
    });
}

“php artisan migrate:refresh”当我尝试运行此命令时,我收到错误,显示在图像中。

请帮我解决此问题。

提前致谢。

1 个答案:

答案 0 :(得分:0)

似乎在某些mysql版本的laravel中存在已知问题,请检查here

目前,如果您想解决此问题,请使用' text'而不是json