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

(-)a/installer/data/mysql/atomicupdate/bug_22899_add_items_constraint_to_tmpholdsqueue.perl (-1 / +5 lines)
Lines 2-7 $DBversion = 'XXX'; # will be replaced by the RM Link Here
2
if( CheckVersion( $DBversion ) ) {
2
if( CheckVersion( $DBversion ) ) {
3
    # you can use $dbh here like:
3
    # you can use $dbh here like:
4
    unless ( foreign_key_exists( 'tmp_holdsqueue', 'tmp_holdsqueue_ibfk_1' ) ) {
4
    unless ( foreign_key_exists( 'tmp_holdsqueue', 'tmp_holdsqueue_ibfk_1' ) ) {
5
        $dbh->do(q{
6
            DELETE t FROM tmp_holdsqueue t
7
            LEFT JOIN items i ON t.itemnumber=i.itemnumber
8
            WHERE i.itemnumber IS NULL
9
        });
5
        $dbh->do(q{
10
        $dbh->do(q{
6
            ALTER TABLE tmp_holdsqueue
11
            ALTER TABLE tmp_holdsqueue
7
            ADD CONSTRAINT `tmp_holdsqueue_ibfk_1` FOREIGN KEY (`itemnumber`)
12
            ADD CONSTRAINT `tmp_holdsqueue_ibfk_1` FOREIGN KEY (`itemnumber`)
8
- 

Return to bug 22899