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

(-)a/installer/data/mysql/atomicupdate/bug_23816.perl (+14 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    # you can use $dbh here like:
4
    # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" );
5
    if( !column_exists( 'categories', 'min_password_length' ) ) {
6
        $dbh->do("ALTER TABLE categories ADD COLUMN `min_password_length` smallint(6) NULL DEFAULT NULL AFTER `change_password` -- set minimum password length for patrons in this category");
7
    }
8
    if( !column_exists( 'categories', 'require_strong_password' ) ) {
9
        $dbh->do("ALTER TABLE categories ADD COLUMN `require_strong_password` TINYINT(1) NULL DEFAULT NULL AFTER `min_password_length` -- set required password strength for patrons in this category");
10
    }
11
12
    # Always end with this (adjust the bug info)
13
    NewVersion( $DBversion, 23816, "Add min_password_length and require_strong_password columns in categories table");
14
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 324-329 CREATE TABLE `categories` ( -- this table shows information related to Koha patr Link Here
324
  `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'.
324
  `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'.
325
  `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow,
325
  `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow,
326
  `change_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can change their passwords in the OAPC
326
  `change_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can change their passwords in the OAPC
327
  `min_password_length` smallint(6) NULL DEFAULT NULL, -- set minimum password length for patrons in this category
328
  `require_strong_password` TINYINT(1) NULL DEFAULT NULL, -- set required password strength for patrons in this category
327
  PRIMARY KEY  (`categorycode`),
329
  PRIMARY KEY  (`categorycode`),
328
  UNIQUE KEY `categorycode` (`categorycode`)
330
  UNIQUE KEY `categorycode` (`categorycode`)
329
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
331
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
330
- 

Return to bug 23816