I
I
ID1410066282021-03-30 18:01:05
Laravel
ID141006628, 2021-03-30 18:01:05

SQLSTATE[HY000]: General error: 1364 or query not working?

Updated migration for 'users' table

public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->id();
            $table->string('fullName')->nullable();
            $table->string('username');
            $table->string('password');
            $table->string('avatar')->default('/assets/images/no-avatar.png');
            $table->string('email')->unique();
            $table->string('role')->default('notpay');
            $table->string('ability')->nullable();
            $table->string('extras')->nullable();
            $table->timestamps();
        });
    }

After that I get an error
60633b2ba5bd3319379654.png
migrate:refresh performed

What could be the problem? Why does SQL swear at ('fullName') if I chose the ->nullable(); parameter?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kudrya, 2021-03-30
@Mugenzo

Maybe full_name?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question