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

(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 58-64 CREATE TABLE `auth_subfield_structure` ( Link Here
58
  `frameworkcode` varchar(10) NOT NULL default '',
58
  `frameworkcode` varchar(10) NOT NULL default '',
59
  `defaultvalue` TEXT DEFAULT '',
59
  `defaultvalue` TEXT DEFAULT '',
60
  PRIMARY KEY  (`authtypecode`,`tagfield`,`tagsubfield`),
60
  PRIMARY KEY  (`authtypecode`,`tagfield`,`tagsubfield`),
61
  KEY `tab` (`authtypecode`,`tab`)
61
  KEY `tab` (`authtypecode`,`tab`),
62
  CONSTRAINT `auth_subfield_structure_ibfk_1` FOREIGN KEY (`authtypecode`) REFERENCES `auth_types` (`authtypecode`) ON DELETE CASCADE ON UPDATE CASCADE
62
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
63
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
63
64
64
--
65
--
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +19 lines)
Lines 10142-10147 if(CheckVersion($DBversion)) { Link Here
10142
    SetVersion($DBversion);
10142
    SetVersion($DBversion);
10143
}
10143
}
10144
10144
10145
$DBversion = "3.19.00.XXX";
10146
if ( CheckVersion($DBversion) ) {
10147
    $dbh->do(q{
10148
        DELETE ass.*
10149
        FROM auth_subfield_structure AS ass
10150
        LEFT JOIN auth_types USING(authtypecode)
10151
        WHERE auth_types.authtypecode IS NULL
10152
    });
10153
10154
    $dbh->do(q{
10155
        ALTER TABLE auth_subfield_structure
10156
        ADD CONSTRAINT auth_subfield_structure_ibfk_1 FOREIGN KEY (authtypecode) REFERENCES auth_types(authtypecode) ON DELETE CASCADE ON UPDATE CASCADE
10157
    });
10158
10159
    print "Upgrade to $DBversion done (Bug 8480 - Add foreign key on auth_subfield_structure.authtypecode)\n";
10160
    SetVersion($DBversion);
10161
}
10162
10163
10145
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
10164
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
10146
# SEE bug 13068
10165
# SEE bug 13068
10147
# if there is anything in the atomicupdate, read and execute it.
10166
# if there is anything in the atomicupdate, read and execute it.
10148
- 

Return to bug 8480