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

(-)a/installer/data/mysql/atomicupdate/bug_32773.pl (+26 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
3
4
return {
5
    bug_number  => "32773",
6
    description => "Add ability to have more than 1 Fast Add framework",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        try {
12
            $dbh->do(q{
13
                ALTER TABLE biblio_framework
14
                ADD COLUMN is_fast_add TINYINT(1) NOT NULL DEFAULT 0
15
                AFTER frameworktext;
16
            });
17
            say $out "Added column 'biblio_framework.is_fast_add'";
18
            $dbh->do(q{
19
                UPDATE biblio_framework SET is_fast_add = 1 where frameworkcode = 'FA';
20
            });
21
        }
22
        catch {
23
            say_failure( $out, "Database modification failed with errors: $_" );
24
        };
25
    },
26
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1121-1126 DROP TABLE IF EXISTS `biblio_framework`; Link Here
1121
CREATE TABLE `biblio_framework` (
1121
CREATE TABLE `biblio_framework` (
1122
  `frameworkcode` varchar(4) NOT NULL DEFAULT '' COMMENT 'the unique code assigned to the framework',
1122
  `frameworkcode` varchar(4) NOT NULL DEFAULT '' COMMENT 'the unique code assigned to the framework',
1123
  `frameworktext` varchar(255) NOT NULL DEFAULT '' COMMENT 'the description/name given to the framework',
1123
  `frameworktext` varchar(255) NOT NULL DEFAULT '' COMMENT 'the description/name given to the framework',
1124
  `is_fast_add` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'the ability to be used as a Fast Add framework',
1124
  PRIMARY KEY (`frameworkcode`)
1125
  PRIMARY KEY (`frameworkcode`)
1125
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1126
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1126
/*!40101 SET character_set_client = @saved_cs_client */;
1127
/*!40101 SET character_set_client = @saved_cs_client */;
1127
- 

Return to bug 32773