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

(-)a/installer/data/mysql/atomicupdate/bug_20772-add-readonly-flag-to-illrequestattributes.perl (+11 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
4
     if( !column_exists( 'illrequestattributes', 'readonly' ) ) {
5
        $dbh->do( "ALTER TABLE illrequestattributes ADD COLUMN readonly tinyint(1) NOT NULL DEFAULT 1" );
6
        $dbh->do( "UPDATE illrequestattributes SET readonly = 1" );
7
     }
8
9
    SetVersion( $DBversion );
10
    print "Upgrade to $DBversion done (Bug 20772 - Add illrequestattributes.readonly column)\n";
11
}
(-)a/installer/data/mysql/kohastructure.sql (-2 / +2 lines)
Lines 4176-4182 DROP TABLE IF EXISTS `illrequestattributes`; Link Here
4176
CREATE TABLE illrequestattributes (
4176
CREATE TABLE illrequestattributes (
4177
    illrequest_id bigint(20) unsigned NOT NULL, -- ILL request number
4177
    illrequest_id bigint(20) unsigned NOT NULL, -- ILL request number
4178
    type varchar(200) NOT NULL,                 -- API ILL property name
4178
    type varchar(200) NOT NULL,                 -- API ILL property name
4179
    value MEDIUMTEXT NOT NULL,                        -- API ILL property value
4179
    value MEDIUMTEXT NOT NULL,                  -- API ILL property value
4180
    readonly tinyint(1) NOT NULL DEFAULT 1,     -- Is this attribute read only
4180
    PRIMARY KEY  (`illrequest_id`, `type` (191)),
4181
    PRIMARY KEY  (`illrequest_id`, `type` (191)),
4181
    CONSTRAINT `illrequestattributes_ifk`
4182
    CONSTRAINT `illrequestattributes_ifk`
4182
      FOREIGN KEY (illrequest_id)
4183
      FOREIGN KEY (illrequest_id)
4183
- 

Return to bug 20772