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

(-)a/installer/data/mysql/atomicupdate/bug_16223.pl (+24 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "16223",
5
    description => "Add new columns lift_after_payment and fee_limit to table restriction_types",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        if( !column_exists( 'restriction_types', 'lift_after_payment' ) ) {
11
            $dbh->do(q{
12
                ALTER TABLE restriction_types ADD COLUMN `lift_after_payment` tinyint(1) NOT NULL DEFAULT 0
13
            });
14
        }
15
        say $out "Added column lift_after_payment";
16
17
        if( !column_exists( 'restriction_types', 'fee_limit' ) ) {
18
            $dbh->do(q{
19
                ALTER TABLE restriction_types ADD COLUMN `fee_limit` decimal(28,6) DEFAULT NULL
20
            });
21
        }
22
        say $out "Added column fee_limit";
23
    },
24
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 4969-4974 CREATE TABLE `restriction_types` ( Link Here
4969
  `display_text` text NOT NULL,
4969
  `display_text` text NOT NULL,
4970
  `is_system` tinyint(1) NOT NULL DEFAULT 0,
4970
  `is_system` tinyint(1) NOT NULL DEFAULT 0,
4971
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
4971
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
4972
  `lift_after_payment` tinyint(1) NOT NULL DEFAULT 0,
4973
  `fee_limit` decimal(28,6) DEFAULT NULL
4972
  PRIMARY KEY (`code`)
4974
  PRIMARY KEY (`code`)
4973
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4975
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4974
/*!40101 SET character_set_client = @saved_cs_client */;
4976
/*!40101 SET character_set_client = @saved_cs_client */;
4975
- 

Return to bug 16223