[Koha] Problems with reseting the catalogue
Chris Cormack
chris at bigballofwax.co.nz
Wed Jan 16 21:58:25 NZDT 2013
On 16 January 2013 21:53, Haik Zargaryan <haikzargaryan at yahoo.com> wrote:
> Dear friends,
> we want to reset our catalogue, so we use ./bulkmarcimport.pl -d script to achieve this. Yet, there is a problem with MySQL database. The tables are constrained with some other tables. Interestingly, there are no hold orders on the records, so there is no reasons why the items should not be deleted. What can you suggest us?
>
>
> -------
>
> DBD::mysql::db do failed: Cannot truncate a table referenced in a foreign key constraint (`kohadata`.`aqorders`, CONSTRAINT `aqorders_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `kohadata`.`biblio` (`biblionumber`)) at ./bulkmarcimport.pl line 97.
> DBD::mysql::db do failed: Cannot truncate a table referenced in a foreign key constraint (`kohadata`.`items`, CONSTRAINT `items_ibfk_1` FOREIGN KEY (`biblioitemnumber`) REFERENCES `kohadata`.`biblioitems` (`biblioitemnumber`)) at ./bulkmarcimport.pl line 98.
> DBD::mysql::db do failed: Cannot truncate a table referenced in a foreign key constraint (`kohadata`.`accountlines`, CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `kohadata`.`items` (`itemnumber`)) at ./bulkmarcimport.pl line 99.
> ------
>
Hi
None of those constraints are to do with holds. They are to do with
orders, and accounts, you need to delete any orders you have placed
and any fines/charges too. As they are linked to items or biblio.
The constraints are the to stop records being deleted that have orders
or fines associated with them otherwise you end up with a big mess in
the database.
Chris
More information about the Koha
mailing list