Caused by inconsistencies between kohastructure and updatedatabase. This unique key may be present in older databases. L3267 ALTER TABLE deleteditems ADD UNIQUE INDEX deleteditemsstocknumberidx (stocknumber); Note that this comment is not in kohastructure too: L3264 ALTER TABLE deleteditems ADD stocknumber VARCHAR(32) DEFAULT NULL COMMENT "stores the inventory number of deleted items";
Not sure if deleteditems.enumchron is correct too for older production dbs.
It's a rather old issue, actually this is a duplicate to bug 23330 that has some of the history. Closed not too long ago (by me), but I'd actually be quite happy to have this fixed.
Created attachment 133075 [details] [review] Bug 30481: Drop unique constraint deleteditemsstocknumberidx Resolves a sync issue between database and schema caused by differences between structure and upgrades. Note: newer databases do not contain this index any longer. Test plan: Run dbrev. Check SHOW CREATE TABLE deleteditems. Verify that unique index has been dropped, regular index added. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Trivial: Self SO
Created attachment 133135 [details] [review] Bug 30481: Drop unique constraint deleteditemsstocknumberidx Resolves a sync issue between database and schema caused by differences between structure and upgrades. Note: newer databases do not contain this index any longer. Test plan: Run dbrev. Check SHOW CREATE TABLE deleteditems. Verify that unique index has been dropped, regular index added. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 133136 [details] [review] Bug 30481: Drop unique constraint deleteditemsstocknumberidx Resolves a sync issue between database and schema caused by differences between structure and upgrades. Note: newer databases do not contain this index any longer. Test plan: Run dbrev. Check SHOW CREATE TABLE deleteditems. Verify that unique index has been dropped, regular index added. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Looks good :)
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Pushed to 21.11.x for 21.11.05