From 008b18e19a70a6a26433541e0b4c7d27bcf0428b Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 17 Feb 2017 12:08:11 -0500 Subject: [PATCH] Fixes deployment issue with new servers due to DB changes. --- CHANGELOG.md | 4 ++++ app/Repositories/ServerRepository.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8def11066..31b4b6ac5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ This file is a running track of new features and fixes to each version of the pa This project follows [Semantic Versioning](http://semver.org) guidelines. +## v0.6.0-pre.2 (Courageous Carniadactylus) +### Fixed +* `[pre.2]` — Fixes bug where servers could not be manually deployed to nodes due to a broken SQL call. + ## v0.6.0-pre.2 (Courageous Carniadactylus) ### Fixed * `[pre.1]` — Fixes bug with database seeders that prevented correctly installing the panel. diff --git a/app/Repositories/ServerRepository.php b/app/Repositories/ServerRepository.php index 8bc0f9f6d..33e446e36 100644 --- a/app/Repositories/ServerRepository.php +++ b/app/Repositories/ServerRepository.php @@ -216,7 +216,7 @@ class ServerRepository // Check Overallocation if (! $autoDeployed) { if (is_numeric($node->memory_overallocate) || is_numeric($node->disk_overallocate)) { - $totals = Models\Server::select(DB::raw('SUM(memory) as memory, SUM(disk) as disk'))->where('node', $node->id)->first(); + $totals = Models\Server::select(DB::raw('SUM(memory) as memory, SUM(disk) as disk'))->where('node_id', $node->id)->first(); // Check memory limits if (is_numeric($node->memory_overallocate)) {