https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40528

Paul Derscheid <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #10 from Paul Derscheid <[email protected]> ---
So, the way to fix this until the next maintenance release is the following:
1. Ensure you have a database backup.

2. Update to v25.05.02-2.

The database revision will not run again, so the next step is manual.

3. There's a file at installer/data/mysql/db_revs/250501001.pl.

This file contains the fixed sql statements for the fixed update, but these
will not run automatically.

4. The fastest way to fix this is to take those statements and run them in the
database manually.

Do not run the following statements all at once, do one after the other, the
limits are denoted by the comments (-- Transaction for ...).

You can wrap each statement in a transaction, like so:

-- Transaction for borrowers table
BEGIN;
UPDATE borrowers
SET checkprevcheckout = 'inherit'
WHERE checkprevcheckout NOT IN ('yes','no','inherit');

ALTER TABLE borrowers
MODIFY COLUMN \`checkprevcheckout\` enum('yes', 'no', 'inherit') NOT NULL
DEFAULT 'inherit' COMMENT 'produce a warning for this patron if this item has
previously been checked out to this patron if ''yes'', not if ''no'', defer to
category setting if ''inherit''.';
COMMIT;

-- Transaction for categories table
BEGIN;
UPDATE categories
SET checkprevcheckout = 'inherit'
WHERE checkprevcheckout NOT IN ('yes','no','inherit');

ALTER TABLE categories
MODIFY COLUMN \`checkprevcheckout\` enum('yes', 'no', 'inherit') NOT NULL
DEFAULT 'inherit' COMMENT 'produce a warning for this patron category if this
item has previously been checked out to this patron if ''yes'', not if ''no'',
defer to syspref setting if ''inherit''.';
COMMIT;

-- Transaction for deletedborrowers table
BEGIN;
UPDATE deletedborrowers
SET checkprevcheckout = 'inherit'
WHERE checkprevcheckout NOT IN ('yes','no','inherit');

ALTER TABLE deletedborrowers
MODIFY COLUMN \`checkprevcheckout\` enum('yes', 'no', 'inherit') NOT NULL
DEFAULT 'inherit' COMMENT 'produce a warning for this patron if this item has
previously been checked out to this patron if ''yes'', not if ''no'', defer to
category setting if ''inherit''.';
COMMIT;

To get a database shell, you can use koha-mysql <YOUR_INSTANCE_NAME>.

5. After that, the bug should be fixed. If not, leave a comment.

-- 
You are receiving this mail because:
You are the assignee for the bug.
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/

Reply via email to