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:
parent
a52336dc01
commit
2ccc6dd141
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user