CREATE TABLE "td"."CimLinks" (
"Id" serial NOT NULL,
"UniqueCode" text NOT NULL,
"StartDate" timestamp without time zone NOT NULL,
"EndDate" timestamp without time zone NULL,
"Name" text NOT NULL,
"SourceClassUniqueCode" text NOT NULL,
"TargetClassUniqueCode" text NOT NULL,
"TypeId" integer NOT NULL,
"CapacityId" integer NOT NULL,
CONSTRAINT "PK_CimLinks" PRIMARY KEY ("Id"),
CONSTRAINT "FK_CimLinks_CimLinkCapacities_CapacityId" FOREIGN KEY ("CapacityId") REFERENCES "td"."CimLinkCapacities" ("Id") ON DELETE CASCADE,
CONSTRAINT "FK_CimLinks_CimLinkTypes_TypeId" FOREIGN KEY ("TypeId") REFERENCES "td"."CimLinkTypes" ("Id") ON DELETE CASCADE
);