https://git.koha-community.org/Koha-community/Koha/src/branch/master/installer/data/mysql/kohastructure.sql Currently, the table borrower_debarments is created like this: CREATE TABLE `borrower_debarments` ( `borrower_debarment_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique key for the restriction', `borrowernumber` int(11) NOT NULL COMMENT 'foreign key for borrowers.borrowernumber for patron who is restricted', `expiration` date DEFAULT NULL COMMENT 'expiration date of the restriction', `type` enum('SUSPENSION','OVERDUES','MANUAL','DISCHARGE') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'MANUAL' COMMENT 'type of restriction', `comment` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'comments about the restriction', `manager_id` int(11) DEFAULT NULL COMMENT 'foreign key for borrowers.borrowernumber for the librarian managing the restriction', `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'date the restriction was added', `updated` timestamp NULL DEFAULT NULL COMMENT 'date the restriction was updated', PRIMARY KEY (`borrower_debarment_id`), KEY `borrowernumber` (`borrowernumber`), CONSTRAINT `borrower_debarments_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; Looks like there has been a mixup between the created and the updated columns? We have this: `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'date the restriction was added', `updated` timestamp NULL DEFAULT NULL COMMENT 'date the restriction was updated', Would it not make more sense to have this: `created` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date the restriction was added', `updated` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp() COMMENT 'date the restriction was updated', ...so that the updated column is actually updated when the row is updated?
Yes it does, can you provide a patch please?