Answers for "sqlstate[42000]: syntax error or access violation: 1075 incorrect table definition;"

PHP
4

SQLSTATE[42000]: Syntax error or access violation: 1071

use Illuminate\Support\Facades\Schema;

/**
 * Bootstrap any application services.
 *
 * @return void
 */
public function boot()
{
    Schema::defaultStringLength(191);
}
Posted by: Guest on November-16-2020
1

SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key"

$table->integer('thnajrn_id', 10)->unsigned();
to
$table->integer('thnajrn_id')->unsigned();
or try
table->integer('thnajrn_id')->length(10)->unsigned();
Posted by: Guest on October-12-2021

Code answers related to "sqlstate[42000]: syntax error or access violation: 1075 incorrect table definition;"

Browse Popular Code Answers by Language