Skip to content
Snippets Groups Projects
Commit 573151d5 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #8887: added sap table

parent 13e17c23
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,9 @@ DROP TABLE IF EXISTS resource_allocation.config CASCADE; ...@@ -23,6 +23,9 @@ DROP TABLE IF EXISTS resource_allocation.config CASCADE;
DROP TABLE IF EXISTS resource_monitoring.resource_group_availability CASCADE; DROP TABLE IF EXISTS resource_monitoring.resource_group_availability CASCADE;
DROP TABLE IF EXISTS resource_monitoring.resource_availability CASCADE; DROP TABLE IF EXISTS resource_monitoring.resource_availability CASCADE;
DROP TABLE IF EXISTS resource_monitoring.resource_capacity CASCADE; DROP TABLE IF EXISTS resource_monitoring.resource_capacity CASCADE;
DROP TABLE IF EXISTS resource_allocation.resource_claim_property CASCADE;
DROP TABLE IF EXISTS resource_allocation.resource_claim_property_type CASCADE;
DROP TABLE IF EXISTS resource_allocation.sap CASCADE;
DROP TABLE IF EXISTS resource_allocation.resource_claim CASCADE; DROP TABLE IF EXISTS resource_allocation.resource_claim CASCADE;
DROP TABLE IF EXISTS resource_allocation.resource_claim_status CASCADE; DROP TABLE IF EXISTS resource_allocation.resource_claim_status CASCADE;
DROP TABLE IF EXISTS resource_allocation.claim_session CASCADE; DROP TABLE IF EXISTS resource_allocation.claim_session CASCADE;
...@@ -183,6 +186,15 @@ CREATE TABLE resource_allocation.resource_claim ( ...@@ -183,6 +186,15 @@ CREATE TABLE resource_allocation.resource_claim (
ALTER TABLE resource_allocation.resource_claim ALTER TABLE resource_allocation.resource_claim
OWNER TO resourceassignment; OWNER TO resourceassignment;
CREATE TABLE resource_allocation.sap (
id serial NOT NULL,
resource_claim_id integer NOT NULL REFERENCES resource_allocation.resource_claim ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE,
number int NOT NULL,
PRIMARY KEY (id)
) WITH (OIDS=FALSE);
ALTER TABLE resource_allocation.sap
OWNER TO resourceassignment;
CREATE TABLE resource_allocation.resource_claim_property_type ( CREATE TABLE resource_allocation.resource_claim_property_type (
id serial NOT NULL, id serial NOT NULL,
name text NOT NULL, name text NOT NULL,
...@@ -194,6 +206,7 @@ ALTER TABLE resource_allocation.resource_claim_property_type ...@@ -194,6 +206,7 @@ ALTER TABLE resource_allocation.resource_claim_property_type
CREATE TABLE resource_allocation.resource_claim_property ( CREATE TABLE resource_allocation.resource_claim_property (
id serial NOT NULL, id serial NOT NULL,
resource_claim_id integer NOT NULL REFERENCES resource_allocation.resource_claim ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE, resource_claim_id integer NOT NULL REFERENCES resource_allocation.resource_claim ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE,
sap_id integer REFERENCES resource_allocation.sap ON DELETE CASCADE DEFERRABLE INITIALLY IMMEDIATE,
type_id integer NOT NULL REFERENCES resource_allocation.resource_claim_property_type DEFERRABLE INITIALLY IMMEDIATE, type_id integer NOT NULL REFERENCES resource_allocation.resource_claim_property_type DEFERRABLE INITIALLY IMMEDIATE,
value int NOT NULL DEFAULT 1, value int NOT NULL DEFAULT 1,
PRIMARY KEY (id) PRIMARY KEY (id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment