Yet another correction from Cristiano to be implemented in DB

From LHEP Wiki
Jump to navigation Jump to search
Dear OPERA Members,
 
before using the procedures to download predictions and candidates to local scanning DBs, please check if your FK_PREDS_CSCANDS foreign key in TB_CS_CANDIDATES points to TB_PREDICTED_BRICKS or to TB_PREDICTED_EVENTS. In the latter case, you need to do nothing; in the former, please run this script (as OPERA) to fix your DB.
 
alter table opera.TB_CS_CANDIDATES drop constraint FK_PREDS_CSCANDS
/
 
alter table opera.TB_CS_CANDIDATES add
  CONSTRAINT "FK_PREDS_CSCANDS" FOREIGN KEY ("ID_EVENT")
   REFERENCES "OPERA"."TB_PREDICTED_EVENTS" ("ID")
/
 
CREATE INDEX "OPERA"."IF_PREDS_CSCANDS" ON "OPERA"."TB_CS_CANDIDATES" ("ID_EVENT")  tablespace operaproc
/
 
After this, you can use the procedure to download predictions and CS candidates.
Best regards
 
Cristiano