📌  相关文章
📜  PDOException::("SQLSTATE[42000]: 语法错误或访问冲突:1071 指定的密钥太长;最大密钥长度为 1000 字节") laravel 8 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:54.340000             🧑  作者: Mango

代码示例1
// Update your /app/Providers/AppServiceProvider.php to contain:

use Illuminate\Support\Facades\Schema;

public function boot()
{
    Schema::defaultStringLength(191);
}

//ON this error 
//   PDOException::("SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists")
// After run ->  php artisan migrate:fresh  <- ! Note this will reset all tables in db