0
votes

enter image description here

This is users migration code:

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" When I am trying to run this command I am getting error which is showing in image.

Please help me to resolve this issue.

Thanks in advance.

1
post the code of your migration - Seva Kalashnikov
It's syntax error in your migration code - senty
I have 20 tables in my migration folder. How can I post here? - user2965171
Post the code for the users migration. - scrubmx
I have post users migration code. Please check. - user2965171

1 Answers

0
votes

It seems there is known issue in laravel in some mysql versions please check here

For now if you want to resolve this issue use 'text' instead of json