https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22887
--- Comment #22 from Lari Taskula <[email protected]> --- (In reply to Jonathan Druart from comment #20) > (In reply to Lari Taskula from comment #15) > > Comment on attachment 101890 [details] [review] [review] > > Bug 22887: Warn if duplicates exist > > > > Review of attachment 101890 [details] [review] [review]: > > ----------------------------------------------------------------- > > > > ::: installer/data/mysql/atomicupdate/bug_22887.perl > > @@ +7,5 @@ > > > + GROUP BY category, authorised_value > > > + HAVING c > 1 > > > + |, { Slice => {} }); > > > + if ( @$duplicates ) { > > > + warn "WARNING - Cannot create unique constraint on > > > authorised_value(category, authorised_value)\n"; > > > > Nice to give a warning. We should still make sure the constraint actually > > gets created for everyone. > > > > Perhaps delete the duplicates and print & log what was deleted? > > > > Or die instead of warn. > > The idea is to not remove data that could be use by a fork in a different > way. I usually prefer to not remove the data, and warn, instead of remove > them and... sometimes people forgets to backup their DB... ;) > But I am not strongly attached to the approach here. Indeed deleting can be a bit nasty and unfair. Then what about stopping updatedatabase.pl with die() until the sysadmin fixes the problem? -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
