diff --git a/SAS/ResourceAssignment/ResourceAssignmentDatabase/sql/create_database.sql b/SAS/ResourceAssignment/ResourceAssignmentDatabase/sql/create_database.sql index 6d744f11c274abf6dcbeaf7852ade2932131a89d..477d9af7af350e8de7d461908bc6fb00bc205588 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.*