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

(-)a/installer/data/mysql/atomicupdate/two-fa.perl (+12 lines)
Lines 15-20 if( CheckVersion( $DBversion ) ) { Link Here
15
    if( !column_exists( 'deletedborrowers', 'secret' ) ) {
15
    if( !column_exists( 'deletedborrowers', 'secret' ) ) {
16
      $dbh->do(q{
16
      $dbh->do(q{
17
          ALTER TABLE deletedborrowers ADD COLUMN `secret` MEDIUMTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Secret for 2FA' AFTER `password`
17
          ALTER TABLE deletedborrowers ADD COLUMN `secret` MEDIUMTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Secret for 2FA' AFTER `password`
18
        });
19
    }
20
21
    if( !column_exists( 'borrowers', 'auth_method' ) ) {
22
      $dbh->do(q{
23
          ALTER TABLE borrowers ADD COLUMN `auth_method` ENUM('password', 'two-factor') NOT NULL DEFAULT 'password' COMMENT 'Authentication method' AFTER `secret`
24
      });
25
    }
26
27
    if( !column_exists( 'deletedborrowers', 'auth_method' ) ) {
28
      $dbh->do(q{
29
          ALTER TABLE deletedborrowers ADD COLUMN `auth_method` ENUM('password', 'two-factor') NOT NULL DEFAULT 'password' COMMENT 'Authentication method' AFTER `secret`
18
      });
30
      });
19
    }
31
    }
20
32
(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 1424-1429 CREATE TABLE `borrowers` ( Link Here
1424
  `sex` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s gender',
1424
  `sex` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s gender',
1425
  `password` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s Bcrypt encrypted password',
1425
  `password` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s Bcrypt encrypted password',
1426
  `secret` MEDIUMTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Secret for 2FA',
1426
  `secret` MEDIUMTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Secret for 2FA',
1427
  `auth_method` ENUM('password', 'two-factor') NOT NULL DEFAULT 'password' COMMENT 'Authentication method',
1427
  `flags` int(11) DEFAULT NULL COMMENT 'will include a number associated with the staff member''s permissions',
1428
  `flags` int(11) DEFAULT NULL COMMENT 'will include a number associated with the staff member''s permissions',
1428
  `userid` varchar(75) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s opac and/or staff interface log in',
1429
  `userid` varchar(75) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s opac and/or staff interface log in',
1429
  `opacnote` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'a note on the patron/borrower''s account that is visible in the OPAC and staff interface',
1430
  `opacnote` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'a note on the patron/borrower''s account that is visible in the OPAC and staff interface',
Lines 2433-2438 CREATE TABLE `deletedborrowers` ( Link Here
2433
  `sex` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s gender',
2434
  `sex` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s gender',
2434
  `password` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s encrypted password',
2435
  `password` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s encrypted password',
2435
  `secret` MEDIUMTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Secret for 2FA',
2436
  `secret` MEDIUMTEXT COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Secret for 2FA',
2437
  `auth_method` ENUM('password', 'two-factor') NOT NULL DEFAULT 'password' COMMENT 'Authentication method',
2436
  `flags` int(11) DEFAULT NULL COMMENT 'will include a number associated with the staff member''s permissions',
2438
  `flags` int(11) DEFAULT NULL COMMENT 'will include a number associated with the staff member''s permissions',
2437
  `userid` varchar(75) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s opac and/or staff interface log in',
2439
  `userid` varchar(75) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s opac and/or staff interface log in',
2438
  `opacnote` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'a note on the patron/borrower''s account that is visible in the OPAC and staff interface',
2440
  `opacnote` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'a note on the patron/borrower''s account that is visible in the OPAC and staff interface',
2439
- 

Return to bug 28786