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

/* Drop Tables */

DROP TABLE IF EXISTS "Datageneration" CASCADE
;

/* Create Tables */

CREATE TABLE "Datageneration"
(
	"Validperiod" varchar NULL,	-- The period of time for which this processing arrangement was/is in place. (Note: this time period must fall within the time period specified in the Deployment).
	"DatagenerationID" varchar NOT NULL,
	"DeploymentID" varchar NULL
)
;

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

ALTER TABLE "Datageneration" ADD CONSTRAINT "PK_Datageneration"
	PRIMARY KEY ("DatagenerationID")
;

/* Create Foreign Key Constraints */

ALTER TABLE "Datageneration" ADD CONSTRAINT "FK_DataGeneration_dataGeneration"
	FOREIGN KEY ("DeploymentID") REFERENCES "Deployment" ("DeploymentID") ON DELETE No Action ON UPDATE No Action
;

/* Create Table Comments, Sequences for Autonumber Columns */

COMMENT ON COLUMN "Datageneration"."Validperiod"
	IS 'The period of time for which this processing arrangement was/is in place. (Note: this time period must fall within the time period specified in the Deployment).'
;