-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtargetedms-26.003-26.004.sql
More file actions
15 lines (13 loc) · 1.3 KB
/
targetedms-26.003-26.004.sql
File metadata and controls
15 lines (13 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
SELECT core.executeJavaUpgradeCode('reparentOrphanedTargetedMSData');
-- Adding missing foreign keys to core.Containers(EntityId)
ALTER TABLE targetedms.Runs ADD CONSTRAINT FK_Runs_Container FOREIGN KEY (Container) REFERENCES core.Containers(EntityId);
ALTER TABLE targetedms.QCAnnotation ADD CONSTRAINT FK_QCAnnotation_Container FOREIGN KEY (Container) REFERENCES core.Containers(EntityId);
ALTER TABLE targetedms.GuideSet ADD CONSTRAINT FK_GuideSet_Container FOREIGN KEY (Container) REFERENCES core.Containers(EntityId);
ALTER TABLE targetedms.AutoQCPing ADD CONSTRAINT FK_AutoQCPing_Container FOREIGN KEY (Container) REFERENCES core.Containers(EntityId);
ALTER TABLE targetedms.PrecursorChromInfo ADD CONSTRAINT FK_PrecursorChromInfo_Container FOREIGN KEY (Container) REFERENCES core.Containers(EntityId);
ALTER TABLE targetedms.SampleFileChromInfo ADD CONSTRAINT FK_SampleFileChromInfo_Container FOREIGN KEY (Container) REFERENCES core.Containers(EntityId);
-- Adding missing indices on Container
CREATE INDEX IX_QCAnnotationType_Container ON targetedms.QCAnnotationType(Container);
CREATE INDEX IX_QCAnnotation_Container ON targetedms.QCAnnotation(Container);
CREATE INDEX IX_GuideSet_Container ON targetedms.GuideSet(Container);
CREATE INDEX IX_QCMetricConfiguration_Container ON targetedms.QCMetricConfiguration(Container);