@@ -, +, @@ --- .../data/mysql/atomicupdate/bug_16223.pl | 24 +++++++++++++++++++ installer/data/mysql/kohastructure.sql | 2 ++ 2 files changed, 26 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_16223.pl --- a/installer/data/mysql/atomicupdate/bug_16223.pl +++ a/installer/data/mysql/atomicupdate/bug_16223.pl @@ -0,0 +1,24 @@ +use Modern::Perl; + +return { + bug_number => "16223", + description => "Add new columns lift_after_payment and fee_limit to table restriction_types", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + if( !column_exists( 'restriction_types', 'lift_after_payment' ) ) { + $dbh->do(q{ + ALTER TABLE restriction_types ADD COLUMN `lift_after_payment` tinyint(1) NOT NULL DEFAULT 0 + }); + } + say $out "Added column lift_after_payment"; + + if( !column_exists( 'restriction_types', 'fee_limit' ) ) { + $dbh->do(q{ + ALTER TABLE restriction_types ADD COLUMN `fee_limit` decimal(28,6) DEFAULT NULL + }); + } + say $out "Added column fee_limit"; + }, +}; --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -2154,6 +2154,8 @@ CREATE TABLE `restriction_types` ( `display_text` text NOT NULL, `is_system` tinyint(1) NOT NULL DEFAULT 0, `is_default` tinyint(1) NOT NULL DEFAULT 0, + `lift_after_payment` tinyint(1) NOT NULL DEFAULT 0, + `fee_limit` decimal(28,6) DEFAULT NULL PRIMARY KEY (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; --