   CONSTRAINT `FK_TGSI_CONTRACT_FUNCTIONALITY_TGSI_CONTRACT`
     FOREIGN KEY (`CONTRACT_Id_Contract` )
     REFERENCES `TGSI_CONTRACT` (`Id_Contract` )
-    ON DELETE NO ACTION
-    ON UPDATE NO ACTION,
+    ON DELETE CASCADE
+    ON UPDATE CASCADE,
   CONSTRAINT `FK_TGSI_CONTRACT_FUNCTIONALITY_TGSI_FUNCTIONALITY`
     FOREIGN KEY (`FUNCTIONALITY_Id_Functionality` )
     REFERENCES `TGSI_FUNCTIONALITY` (`Id_Functionality` )

    FOREIGN KEY (`CONTRACT_Id_Contract` )
    REFERENCES `TGSI_CONTRACT` (`Id_Contract` )
    ON DELETE CASCADE
    ON UPDATE NO ACTION
) 
ENGINE=InnoDB 
DEFAULT CHARSET=utf8 

  CONSTRAINT `FK_TGSI_CONTRACT_REFERENTIAL_TGSI_CONTRACT`
    FOREIGN KEY (`CONTRACT_Id_Contract` )
    REFERENCES `TGSI_CONTRACT` (`Id_Contract` )
    ON DELETE CASCADE
    ON UPDATE CASCADE,
  CONSTRAINT `FK_TGSI_CONTRACT_REFERENTIAL_TGSI_REFERENTIAL`
    FOREIGN KEY (`REFERENTIAL_Id_Referential` )
    REFERENCES `TGSI_REFERENTIAL` (`Id_Referential` )
