PostgreSQL Support (#4486)
Co-authored-by: Matthew Penner <matthew@pterodactyl.io>
This commit is contained in:
parent
21613fa602
commit
3bf5a71802
223 changed files with 912 additions and 1052 deletions
|
@ -40,14 +40,14 @@ class AllocationRepository extends EloquentRepository implements AllocationRepos
|
|||
*/
|
||||
protected function getDiscardableDedicatedAllocations(array $nodes = []): array
|
||||
{
|
||||
$query = Allocation::query()->selectRaw('CONCAT_WS("-", node_id, ip) as result');
|
||||
$query = Allocation::query()->selectRaw('CONCAT_WS(\'-\', node_id, ip) as result');
|
||||
|
||||
if (!empty($nodes)) {
|
||||
$query->whereIn('node_id', $nodes);
|
||||
}
|
||||
|
||||
return $query->whereNotNull('server_id')
|
||||
->groupByRaw('CONCAT(node_id, ip)')
|
||||
->groupByRaw('result')
|
||||
->get()
|
||||
->pluck('result')
|
||||
->toArray();
|
||||
|
@ -89,7 +89,7 @@ class AllocationRepository extends EloquentRepository implements AllocationRepos
|
|||
|
||||
if (!empty($discard)) {
|
||||
$query->whereNotIn(
|
||||
$this->getBuilder()->raw('CONCAT_WS("-", node_id, ip)'),
|
||||
$this->getBuilder()->raw('CONCAT_WS(\'-\', node_id, ip)'),
|
||||
$discard
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue