【问题标题】:Php artisan migrate:refresh not workingPHP工匠迁移:刷新不起作用
【发布时间】:2016-05-25 13:10:41
【问题描述】:

这是用户迁移代码:

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" 当我尝试运行此命令时,我收到了图像中显示的错误。

请帮我解决这个问题。

提前致谢。

【问题讨论】:

  • 发布迁移代码
  • 迁移代码有语法错误
  • 我的迁移文件夹中有 20 个表。我怎样才能在这里发帖?
  • 贴出用户迁移代码。
  • 我已经发布了用户迁移代码。请检查。

标签: laravel


【解决方案1】:

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

现在,如果您想解决此问题,请使用“文本”而不​​是 json

【讨论】:

    猜你喜欢
    • 2018-09-26
    • 1970-01-01
    • 2018-03-12
    • 2015-12-18
    • 2016-05-17
    • 2021-02-21
    • 2018-09-24
    • 1970-01-01
    • 2016-04-16
    相关资源
    最近更新 更多