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

(-)a/installer/data/mysql/atomicupdate/bug_35145_order_patron_attributes.pl (+23 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "35145",
5
    description => "Add display_order column to borrower_attribute_types table",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        # Do you stuffs here
11
        $dbh->do(
12
            q{
13
            ALTER TABLE borrower_attribute_types
14
            ADD COLUMN IF NOT EXISTS display_order INT(11) DEFAULT NULL COMMENT
15
                'the order in which this attribute type appears in patron form' AFTER `mandatory`
16
        }
17
        );
18
19
        # Print useful stuff here
20
        # tables
21
        say_success( $out, "Added column 'borrower_attribute_types.display_order'" );
22
    },
23
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1261-1266 CREATE TABLE `borrower_attribute_types` ( Link Here
1261
  `class` varchar(255) NOT NULL DEFAULT '' COMMENT 'defines a class for an attribute_type',
1261
  `class` varchar(255) NOT NULL DEFAULT '' COMMENT 'defines a class for an attribute_type',
1262
  `keep_for_pseudonymization` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is copied to anonymized_borrower_attributes (1 for yes, 0 for no)',
1262
  `keep_for_pseudonymization` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is copied to anonymized_borrower_attributes (1 for yes, 0 for no)',
1263
  `mandatory` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not',
1263
  `mandatory` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not',
1264
  `display_order` int(11) DEFAULT NULL COMMENT 'the order in which this attribute type appears in patron form',
1264
  PRIMARY KEY (`code`),
1265
  PRIMARY KEY (`code`),
1265
  KEY `auth_val_cat_idx` (`authorised_value_category`),
1266
  KEY `auth_val_cat_idx` (`authorised_value_category`),
1266
  KEY `category_code` (`category_code`),
1267
  KEY `category_code` (`category_code`),
1267
- 

Return to bug 35145