  REFERENCES canano.lab_file (file_pk_id) ON UPDATE RESTRICT ON DELETE RESTRICT
 ;
 
-
-
--- Re-enable foreign key checks
 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
  
 ALTER TABLE canano.common_lookup

ALTER TABLE canano.author
CHANGE document_author_pk_id author_pk_id BIGINT(20) not null;

--add data to author.created_by and author.created_date
--larger author.id should has larger author.created_date
UPDATE canano.author author
SET author.created_by = 'DATA_MIGRATION',
author.created_date = ADDDATE(SYSDATE(), INTERVAL author.author_pk_id SECOND)
order by author.author_pk_id;

-- change to not null
ALTER TABLE canano.author
 CHANGE created_date created_date DATETIME NOT NULL;
 


UPDATE csm_protection_group
SET protection_group_name = 'publication' 
WHERE  protection_group_name = 'document';

INSERT INTO canano.nanoparticle_sample_publication
(
	particle_sample_pk_id,
