View | Details | Raw Unified | Return to bug 21890
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_21890_pwd_reset_by_category.perl (+14 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
4
    if ( !column_exists( 'categories', 'reset_password' ) ) {
5
        $dbh->do(q{
6
            ALTER TABLE categories
7
                ADD COLUMN reset_password TINYINT(1) NULL DEFAULT NULL
8
                AFTER checkprevcheckout
9
        });
10
    }
11
12
    SetVersion( $DBversion );
13
    print "Upgrade to $DBversion done (Bug 21890 - Patron password reset by category)\n";
14
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 318-323 CREATE TABLE `categories` ( -- this table shows information related to Koha patr Link Here
318
  `BlockExpiredPatronOpacActions` tinyint(1) NOT NULL default '-1', -- wheither or not a patron of this category can renew books or place holds once their card has expired. 0 means they can, 1 means they cannot, -1 means use syspref BlockExpiredPatronOpacActions
318
  `BlockExpiredPatronOpacActions` tinyint(1) NOT NULL default '-1', -- wheither or not a patron of this category can renew books or place holds once their card has expired. 0 means they can, 1 means they cannot, -1 means use syspref BlockExpiredPatronOpacActions
319
  `default_privacy` ENUM( 'default', 'never', 'forever' ) NOT NULL DEFAULT 'default', -- Default privacy setting for this patron category
319
  `default_privacy` ENUM( 'default', 'never', 'forever' ) NOT NULL DEFAULT 'default', -- Default privacy setting for this patron category
320
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- 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'.
320
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- 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'.
321
  `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow
321
  PRIMARY KEY  (`categorycode`),
322
  PRIMARY KEY  (`categorycode`),
322
  UNIQUE KEY `categorycode` (`categorycode`)
323
  UNIQUE KEY `categorycode` (`categorycode`)
323
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
324
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
324
- 

Return to bug 21890