1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-24 03:12:46 +01:00

Disable sql_require_primary_key=0 for PostgreSQL - closes #1518

This commit is contained in:
FreeScout 2021-10-28 05:51:19 -07:00
parent a52336dc01
commit 2ccc6dd141

View File

@ -1418,9 +1418,13 @@ class Helper
/**
* Disable sql_require_primary_key option to avoid errors when migrating.
* Only for MySQL.
*/
public static function disableSqlRequirePrimaryKey()
{
if (!self::isMySql()) {
return;
}
try {
\DB::statement('SET SESSION sql_require_primary_key=0');
} catch (\Exception $e) {