Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[old datadict] data_dictionary_builder script crashing because of a SQL constraint violation #9155

Open
MaximeMulder opened this issue Mar 21, 2024 · 0 comments
Assignees
Labels
26.0.0-bugs Issues that were raised during the release testing for 26.0.0 Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)

Comments

@MaximeMulder
Copy link
Contributor

MaximeMulder commented Mar 21, 2024

Describe the bug

While doing my testing for Loris 26, I failed to run the data_dictionary_builder.php because of an SQL contraint violation. After discussing it with @ridz1208, it seems this behaviour is indeed unexpected.

Copy of the error :

lorisadmin@test-dev-260:/var/www/Loris/tools/exporters$ php data_dictionary_builder.php
PHP Fatal error:  Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`test_dev_260`.`publication_parameter_type_rel`, CONSTRAINT `FK_publication_parameter_type_rel_ParameterTypeID` FOREIGN KEY (`ParameterTypeID`) REFERENCES `parameter_type` (`ParameterTypeID`)) in /var/www/Loris/php/libraries/Database.class.inc:645
Stack trace:
#0 /var/www/Loris/php/libraries/Database.class.inc(645): PDO->exec()
#1 /var/www/Loris/tools/exporters/data_dictionary_builder.php(65): Database->run()
#2 {main}
  thrown in /var/www/Loris/php/libraries/Database.class.inc on line 645

I don't have much knowledge on these tables so someone more familiar with them should probably look into it.

@MaximeMulder MaximeMulder added Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) 26.0.0-bugs Issues that were raised during the release testing for 26.0.0 labels Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
26.0.0-bugs Issues that were raised during the release testing for 26.0.0 Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)
Projects
None yet
Development

No branches or pull requests

2 participants