[Koha-devel] {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY'

2024-07-10 Thread Michael Kuhn via Koha-devel
Hi We have loaded our Koha 19.11 database into a new Koha 24.05 instance. When running "koha-upgrade-schema" the following error appears: ... Upgrade to 19.12.00.017 [12:00:41]: Bug 21674 - Add unique key (parent_id, branchcode) to library_group {UNKNOWN}: DBI Exception: DBD::mysql::db do fa

Re: [Koha-devel] [Koha] {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY'

2024-07-10 Thread Philippe Blouin via Koha-devel
updatedatabase.pl line 20736 It's the conversion from issuingrules to circulation_rules. What's the state of your DB right now?  Has it started to convert?  How many circ rules already created?  I suspect it's 0, but it's worth asking. Considering the id is an autoincrement, and it not moved

Re: [Koha-devel] [Koha] {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY'

2024-07-10 Thread Michael Kuhn via Koha-devel
Hi Philippe You wrote: > updatedatabase.pl line 20736 > > It's the conversion from issuingrules to circulation_rules. What's the > state of your DB right now? Has it started to convert? The script stopped just after giving the shown message. > How many circ rules already created? I suspect i

Re: [Koha-devel] [Koha] {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY'

2024-07-10 Thread Philippe Blouin via Koha-devel
Ok, let's cheat.  You have very few rules, and most of the info has been moved already.  So just comment the lines 20734 to 20746 and run updatedatabase.pl again. OR modify the version to move ahead. update systempreferences set value = '19.1200018' where variable = 'version'; Then you can

Re: [Koha-devel] [Koha] {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY'

2024-07-10 Thread Michael Kuhn via Koha-devel
Hi Philippe Many thanks! You wrote: > Ok, let's cheat. You have very few rules, and most of the info has > been moved already. So just comment the lines 20734 to 20746 and run > updatedatabase.pl again. > > OR modify the version to move ahead. > > update systempreferences set value = '19.12000

Re: [Koha-devel] [Koha] {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY'

2024-07-10 Thread Michael Kuhn via Koha-devel
Hi At my own risk I have modified the version to 19.12.00.029 and then moved ahead... (of course table "opac_news" will have to be checked after the update) Unfortunately then another error popped up: Upgrade to 19.12.00.075 [15:28:32]: Bug 25086 - Set changed_fields column of borrower_mod

Re: [Koha-devel] [Koha] {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY'

2024-07-10 Thread Philippe Blouin via Koha-devel
The problem is deeper, then.  issuingrule didn't have unique id, so the problem is not with the starting db.  It seems to be when creating the new entries, autoincrement doesn't seem to do its job ? I don't think there's any integrity problem with your old database, more with the environment,

Re: [Koha-devel] [Koha] {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY'

2024-07-10 Thread Philippe Blouin via Koha-devel
If you're a bit adventurous (and have some time, which you're probably thinking you've burnt enough already): try to update to 20.05, for example, using 20.05 code. So you reset your installation (you have saved your DB, right?), then instead of installing a 24.05, you install an older version

Re: [Koha-devel] [Koha] {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY'

2024-07-10 Thread Michael Kuhn via Koha-devel
Hi Philippe You wrote: > If you're a bit adventurous (and have some time, which you're probably > thinking you've burnt enough already): try to update to 20.05, for > example, using 20.05 code. > > So you reset your installation (you have saved your DB, right?), then > instead of installing a 24

Re: [Koha-devel] [Koha] {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry '0' for key 'PRIMARY'

2024-07-10 Thread Philippe Blouin via Koha-devel
If you went with an existing 23.11 and tried to overwrite the database with you 19.05 one, it's possible it got conflicts since it drop-and-add in the order in the file and dependencies might break.  Always easier to just drop the old database and load the "new" one in an empty space. Then you