During my setup of opsi Mysql Module I've found this bug :
When I launch opsi-product-updater -i -vv I've got this message ,
Code: Alles auswählen
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`opsiXXXXXXXX`.`PRODUCT_ON_DEPOT`, CONSTRAINT `PRODUCT_ON_DEPOT_ibfk_2` FOREIGN KEY (`depotId`) REFERENCES `HOST` (`hostId`))
This is due to my fqdn of 59 chars for my opsi-depot-server, but in your mysql schema you define a foreign key depotId -> ( HOST -> hostId )
depotId is limited to varchar(50) and hostId varchar(255)
I've update the depotId row to support varchar(64) ( DNS RFC ) and it's work fine.
It is possible to release an update of this schema or not ?
This is my update :
ALTER TABLE `PRODUCT_ON_DEPOT` CHANGE `depotId` `depotId` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
( I have 180 OPSI servers, and I need to find a way to deploy correctly the mysql module )