/* ---------------------------------------------------- */
/*  Generated by Enterprise Architect Version 15.2 		*/
/*  Created On : 04-May-2022 21:43:56 				*/
/*  DBMS       : PostgreSQL 						*/
/* ---------------------------------------------------- */

/* Drop Tables */

DROP TABLE IF EXISTS "Observingcapability" CASCADE
;

/* Create Tables */

CREATE TABLE "Observingcapability"
(
	"Observation" varchar NULL,
	"Programaffiliation" varchar NULL,
	"ObservingcapabilityID" varchar NOT NULL,
	facility varchar NULL
)
;

/* Create Primary Keys, Indexes, Uniques, Checks */

ALTER TABLE "Observingcapability" ADD CONSTRAINT "PK_Observingcapability"
	PRIMARY KEY ("ObservingcapabilityID")
;

/* Create Foreign Key Constraints */

ALTER TABLE "Observingcapability" ADD CONSTRAINT "FK_ObservingCapability_facility"
	FOREIGN KEY (facility) REFERENCES "Observingfacility" ("ObservingfacilityID") ON DELETE No Action ON UPDATE No Action
;