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 327-332 CREATE TABLE `categories` ( -- this table shows information related to Koha patr Link Here
327
  `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'.
327
  `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'.
328
  `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow,
328
  `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow,
329
  `change_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can change their passwords in the OAPC
329
  `change_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can change their passwords in the OAPC
330
  `min_password_length` smallint(6) NULL DEFAULT NULL, -- set minimum password length for patrons in this category
331
  `require_strong_password` TINYINT(1) NULL DEFAULT NULL, -- set required password strength for patrons in this category
330
  PRIMARY KEY  (`categorycode`),
332
  PRIMARY KEY  (`categorycode`),
331
  UNIQUE KEY `categorycode` (`categorycode`)
333
  UNIQUE KEY `categorycode` (`categorycode`)
332
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
334
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
333
- 

Return to bug 23816