 	foreignSource	varchar(64),
 	foreignId       varchar(64),
 
-	constraint pk_nodeID primary key (nodeID),
-	constraint fk_dpName foreign key (dpName) references monitoringsystems (id) on delete cascade
+	constraint pk_nodeID primary key (nodeID)
 );
 
 create index node_id_type_idx on node(nodeID, nodeType);
 create index node_label_idx on node(nodeLabel);
-create index node_dpname_idx on node(dpName);
 create unique index node_foreign_unique_idx on node(foreignSource, foreignId);
 
 --#########################################################################


create table node (
	nodeID		integer not null,
	dpName		text,
	nodeCreateTime	timestamp with time zone not null,
	nodeParentID	integer,
	nodeType	char(1),

    alarmType               INTEGER,
    counter                 INTEGER NOT NULL,
    severity                INTEGER NOT NULL,
    lastEventID             INTEGER, CONSTRAINT fk_eventIDak2 FOREIGN KEY (lastEventID) REFERENCES events (eventID) ON DELETE CASCADE,
    firstEventTime          timestamp with time zone,
    lastEventTime           timestamp with time zone,
    firstAutomationTime     timestamp with time zone,
