- Copy the new war file to tomcat's directory :
- data live in the old mysql database (molgenis14 ) so you need to run the steps of the migration script : https://www.dropbox.com/home/BBmri%20App/migration_issue?select=migration-script.rtf) in order to change only the scheme NOT the data
=============================WITHOUT COMMENTS =========================================== CREATE TABLE `BiobankSubCategory` ( `id` int(11) NOT NULL, PRIMARY KEY (`id`), CONSTRAINT `biobanksubcategory_ibfk_1` FOREIGN KEY (`id`) REFERENCES `OntologyTerm` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO BiobankSubCategory (id) SELECT id FROM BiobankCategory WHERE id NOT IN ("281", "284", "285") ; CREATE TABLE BiobankPersonRole ( id INTEGER NOT NULL , PRIMARY KEY(id) ); alter table OntologyTerm modify column __Type enum('OntologyTerm','PersonRole','Species','AlternateId','BiobankCategory','BiobankTopic','BiobankDataType', 'BiobankSubCategory','BiobankPersonRole'); ALTER TABLE Biobank DROP FOREIGN KEY biobank_ibfk_5; ALTER TABLE BiobankSubCategory ADD FOREIGN KEY (id) REFERENCES OntologyTerm (id) ON DELETE CASCADE; <----------IF THIS FAILS USE THE NEXT : ALTER TABLE `BiobankSubCategory` ADD CONSTRAINT `biobank_ibfk_5` FOREIGN KEY (`id`) REFERENCES OntologyTerm (id) ON DELETE CASCADE; AUTO UPARXEI HDH APO THN DHMIOURGIA TOU) ALTER TABLE Biobank ADD FOREIGN KEY (SubCategory) REFERENCES BiobankSubCategory (id) ON DELETE RESTRICT; <----------IF THIS FAILS USE THE NEXT : ALTER TABLE `Biobank` ADD CONSTRAINT `biobank_ibfk_885` FOREIGN KEY (`SubCategory`) REFERENCES BiobankSubCategory (id) ON DELETE CASCADE; DELETE FROM BiobankCategory WHERE id NOT IN ("281", "284", "285") ; ALTER TABLE BiobankPersonRole ADD FOREIGN KEY (id) REFERENCES PersonRole (id) ON DELETE CASCADE; ALTER TABLE `BiobankPersonRole` ADD CONSTRAINT `BiobankPersonRole_ibfk_33` FOREIGN KEY (`id`) REFERENCES PersonRole (id) ON DELETE CASCADE; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='282'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='283'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='286'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='287'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='288'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='289'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='290'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='291'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='292'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='293'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='295'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='296'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='297'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='298'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='564'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='299'; UPDATE OntologyTerm SET __Type="BiobankSubCategory" WHERE id='294'; select * from OntologyTerm where name="Software Engineer"; delete from OntologyTerm where id=561; select * from BiobankPersonRole; insert into BiobankPersonRole values(561); select * from OntologyTerm where name="coordinator"; delete from OntologyTerm where id=593; select * from BiobankPersonRole; insert into BiobankPersonRole values(277); select * from OntologyTerm where name="postdoc"; delete from OntologyTerm where id=594; select * from BiobankPersonRole; insert into BiobankPersonRole values(278); select * from OntologyTerm where name="administrator"; delete from OntologyTerm where id=595; select * from BiobankPersonRole; insert into BiobankPersonRole values(279); select * from OntologyTerm where name="IT responsible"; delete from OntologyTerm where id=596; select * from BiobankPersonRole; insert into BiobankPersonRole values(280); COMMIT; =============
Last modified 12 years ago
Last modified on 2013-02-22T11:35:06+01:00