   INDEX nodetype_id (nodetype_id ASC),
   FOREIGN KEY (user_id)
 	REFERENCES agora.users (user_id)
-    ON DELETE NO ACTION
-    ON UPDATE NO ACTION,
+    ON DELETE CASCADE
+    ON UPDATE CASCADE,
   FOREIGN KEY (map_id)
 	REFERENCES agora.maps (map_id)
-    ON DELETE NO ACTION
-    ON UPDATE NO ACTION,
+    ON DELETE CASCADE
+    ON UPDATE CASCADE,
   FOREIGN KEY(nodetype_id)
     REFERENCES agora.node_types (nodetype_id)
-	ON DELETE NO ACTION
-	ON UPDATE NO ACTION);
+	ON DELETE CASCADE
+	ON UPDATE CASCADE);
 
 -- -----------------------------------------------------
 -- Table agora.textboxes

  INDEX type_id (type_id ASC),
  FOREIGN KEY (user_id)
	REFERENCES agora.users (user_id)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  FOREIGN KEY (map_id)
    REFERENCES agora.maps (map_id)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  FOREIGN KEY (node_id)
    REFERENCES agora.nodes (node_id)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  FOREIGN KEY (type_id)
    REFERENCES agora.connection_types (type_id)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
-- The node_id is the claim.

-- -----------------------------------------------------

  INDEX user_id (user_id ASC),
  FOREIGN KEY (user_id)
    REFERENCES agora.users (user_id)
    ON DELETE CASCADE
    ON UPDATE CASCADE);

-- -------------------------------------------------------
-- Table agora.node_types
