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 10025-10030 if ( CheckVersion($DBversion) ) { Link Here
10025
    SetVersion ($DBversion);
10025
    SetVersion ($DBversion);
10026
}
10026
}
10027
10027
10028
$DBversion = "3.19.00.XXX";
10029
if ( CheckVersion($DBversion) ) {
10030
    $dbh->do(q{
10031
        DELETE ass.*
10032
        FROM auth_subfield_structure AS ass
10033
        LEFT JOIN auth_types USING(authtypecode)
10034
        WHERE auth_types.authtypecode IS NULL
10035
    });
10036
10037
    $dbh->do(q{
10038
        ALTER TABLE auth_subfield_structure
10039
        ADD CONSTRAINT auth_subfield_structure_ibfk_1 FOREIGN KEY (authtypecode) REFERENCES auth_types(authtypecode) ON DELETE CASCADE ON UPDATE CASCADE
10040
    });
10041
10042
    print "Upgrade to $DBversion done (Bug 8480 - Add foreign key on auth_subfield_structure.authtypecode)\n";
10043
    SetVersion($DBversion);
10044
}
10045
10046
10028
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
10047
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
10029
# SEE bug 13068
10048
# SEE bug 13068
10030
# if there is anything in the atomicupdate, read and execute it.
10049
# if there is anything in the atomicupdate, read and execute it.
10031
- 

Return to bug 8480