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

(-)a/installer/data/mysql/atomicupdate/Bug-18705-collections_tracking-fk-items.sql (+3 lines)
Line 0 Link Here
1
DELETE FROM collections_tracking WHERE itemnumber NOT IN (SELECT itemnumber FROM items WHERE items.itemnumber = collections_tracking.itemnumber);
2
ALTER TABLE collections_tracking ADD CONSTRAINT FOREIGN KEY `coltra-fk-items` (itemnumber) REFERENCES items (itemnumber);
3
(-)a/installer/data/mysql/kohastructure.sql (-2 / +3 lines)
Lines 448-454 CREATE TABLE collections_tracking ( Link Here
448
  transferred tinyint(1) DEFAULT '0',
448
  transferred tinyint(1) DEFAULT '0',
449
  date_added datetime DEFAULT NULL,
449
  date_added datetime DEFAULT NULL,
450
  timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
450
  timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
451
  PRIMARY KEY (collections_tracking_id)
451
  PRIMARY KEY (collections_tracking_id),
452
  CONSTRAINT `coltra-fk-items` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`)
453
    ON DELETE CASCADE ON UPDATE CASCADE
452
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
454
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
453
455
454
--
456
--
455
- 

Return to bug 18705