From a6e3bbe9a7dae9d1ee6e2d560b6cd04c34469b50 Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Fri, 12 May 2017 11:00:41 +0000
Subject: [PATCH] Task #10811: comments on columns to clarify meaning

---
 .../ResourceAssignmentDatabase/sql/create_database.sql       | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/SAS/ResourceAssignment/ResourceAssignmentDatabase/sql/create_database.sql b/SAS/ResourceAssignment/ResourceAssignmentDatabase/sql/create_database.sql
index 6d744f11c27..477d9af7af3 100644
--- a/SAS/ResourceAssignment/ResourceAssignmentDatabase/sql/create_database.sql
+++ b/SAS/ResourceAssignment/ResourceAssignmentDatabase/sql/create_database.sql
@@ -323,6 +323,8 @@ CREATE TABLE resource_monitoring.resource_capacity (
 ) WITH (OIDS=FALSE);
 ALTER TABLE resource_monitoring.resource_capacity
   OWNER TO resourceassignment;
+COMMENT ON COLUMN resource_monitoring.resource_capacity.available IS 'This is the current (momentaneous) available capacity of this resource (which is total-used) and has to be set from a monitoring system.';
+COMMENT ON COLUMN resource_monitoring.resource_capacity.total IS 'This is the total (momentaneous) available capacity of this resource. Usually the total capacity is fixed, but it could change, for example when you add an extra disk.';
 
 CREATE TABLE resource_monitoring.resource_usage (
   id serial NOT NULL,
@@ -457,6 +459,9 @@ ALTER VIEW resource_monitoring.resource_view
   OWNER TO resourceassignment;
 COMMENT ON VIEW resource_monitoring.resource_view
   IS 'view on virtual_instrument.resource_view including availability and capacity';
+COMMENT ON COLUMN resource_monitoring.resource_view.available_capacity IS 'This is the current (momentaneous) available capacity of this resource (which is total-used) and has to be set from a monitoring system.';
+COMMENT ON COLUMN resource_monitoring.resource_view.used_capacity IS 'This is the current (momentaneous) used capacity of this resource (which is total-available) and has to be set from a monitoring system.';
+COMMENT ON COLUMN resource_monitoring.resource_view.total_capacity IS 'This is the total (momentaneous) available capacity of this resource. Usually the total capacity is fixed, but it could change, for example when you add an extra disk.';
 
 CREATE OR REPLACE VIEW resource_monitoring.resource_usage_view AS
   SELECT ru.as_of_timestamp, ru.usage, ru.status_id, rcs.name as status_name, rv.*
-- 
GitLab