text: --run the alter command in sqlplus.
  alter session set NLS_DATE_FORMAT='yyyy/mm/dd:hh:mi:ssam';
  
  spool mig-3.log;
  select sysdate from dual;
  
  ALTER TABLE FILE_LUMIS DROP PRIMARY KEY;
  ALTER TABLE FILE_LUMIS DROP constraint FL_FLM;
  DROP index IDX_FLM_1;
  
  INSERT /*+ append */ INTO FILE_LUMIS(RUN_NUM, LUMI_SECTION_NUM, FILE_ID)
  SELECT R.RUNNUMBER, LS.LUMISECTIONNUMBER, FRL.FILEID FROM CMS_DBS_PROD_GLOBAL.FILERUNLUMI FRL
  join CMS_DBS_PROD_GLOBAL.RUNS R on R.ID = FRL.RUN
  join CMS_DBS_PROD_GLOBAL.LUMISECTION LS on LS.ID = FRL.LUMI;
  
  commit;
  select 'Done insert FILE_LUMIS' from dual;
  select sysdate from dual;
  
  ALTER TABLE FILE_LUMIS ADD (
    CONSTRAINT FL_FLM
   FOREIGN KEY (FILE_ID)
   REFERENCES FILES (FILE_ID)
      ON DELETE CASCADE);
  
  CREATE INDEX IDX_FLM_1 ON FILE_LUMIS
  (FILE_ID);
  
  ALTER TABLE FILE_LUMIS ADD (
    CONSTRAINT PK_FLM
   PRIMARY KEY
   (RUN_NUM, LUMI_SECTION_NUM, FILE_ID)
      USING INDEX);
  
  select 'Done recreate  FILE_LUMIS constraint' from dual;
  select sysdate from dual;
  
  spool off;
  