From ace40d64fc72891e25baab78b9c2119655638186 Mon Sep 17 00:00:00 2001 From: remillet Date: Wed, 24 May 2017 12:42:04 -0700 Subject: [PATCH] CSPACE-7094: Adding script for migrating v4.4 herbarium profile based databases to v4.5. --- README.txt | 41 ++------------------------ misc/migrate_v4.4herbarium_to_v4.5.sql | 26 ++++++++++++++++ 2 files changed, 29 insertions(+), 38 deletions(-) create mode 100644 misc/migrate_v4.4herbarium_to_v4.5.sql diff --git a/README.txt b/README.txt index 3f5d34cd4..1697d6dce 100644 --- a/README.txt +++ b/README.txt @@ -1,38 +1,3 @@ -Change on 1/23/2013 -This change should appear only in the trunk. Currently git again r1624. This is another test of the patching mechanism. -Changed, 20101018 - -Nothing changed? - -A whole lot changed. See below - -About -Blog -Features -Contact & Support -Training -GitHub Enterprise -Site Status - -The quick brown fox jumped over the lazy dog. -Another change using SmartGit client. - -All good boys deserve fudge. - -All SSH keys deserve better. - -All SSH keys deserve fudge. -======= -Make 1 - Edited on github -Make 2 -Make 3 - Edited locally -Make 4 -Make 5 -Make 6 - Edited on github - -Make 7 - -Make 8 -Make 9 in detached head again. -Only on the "master" branch? -RSA Check +CollectionSpace is an open-source, web-based software application for the description, management, and dissemination of museum collections information. The CollectionSpace project team is made up of museum professionals, software engineers, and interaction designers. +CollectionSpace is licensed for use pursuant to the Educational Community License v2.0. Learn more about the ECL at http://opensource.org/licenses/ECL-2.0. The source code is freely available. +For more information about CollectionSpace see http://www.collectionspace.org/about/faq. \ No newline at end of file diff --git a/misc/migrate_v4.4herbarium_to_v4.5.sql b/misc/migrate_v4.4herbarium_to_v4.5.sql new file mode 100644 index 000000000..ba8d1cd7f --- /dev/null +++ b/misc/migrate_v4.4herbarium_to_v4.5.sql @@ -0,0 +1,26 @@ +-- db1: {herbarium45_default localhost 5432 csadmin cs1dn3b sslmode=disable} +-- db2: {herbarium_default localhost 5432 csadmin cs1dn3b sslmode=disable} +-- Run the following SQL againt db2: +DROP TABLE IF EXISTS collectionobjects_naturalhistory; + +-- Rename these tables and corresponding columns +ALTER TABLE associatedtaxagroup RENAME TO herbassociatedtaxagroup; +ALTER TABLE herbassociatedtaxagroup RENAME COLUMN assocTaxon TO herbAssocTaxon; +ALTER TABLE herbassociatedtaxagroup RENAME COLUMN assocTaxonCommonName TO herbAssocTaxonCommonName; +ALTER TABLE herbassociatedtaxagroup RENAME COLUMN assocTaxonInteraction TO herbAssocTaxonInteraction; + +ALTER TABLE localitygroup RENAME TO herblocalitygroup; +ALTER TABLE herblocalitygroup RENAME COLUMN collectionLocationVerbatim TO herbCollectionLocationVerbatim; +ALTER TABLE herblocalitygroup RENAME COLUMN collectionPlace TO herbCollectionPlace; + +ALTER TABLE typespecimengroup RENAME TO herbtypespecimengroup; +ALTER TABLE herbtypespecimengroup RENAME COLUMN typeSpecimenKind TO herbTypeSpecimenKind; +ALTER TABLE herbtypespecimengroup RENAME COLUMN typeSpecimenAssertionBy TO herbTypeSpecimenAssertionBy; +ALTER TABLE herbtypespecimengroup RENAME COLUMN typeSpecimenReference TO herbTypeSpecimenReference; +ALTER TABLE herbtypespecimengroup RENAME COLUMN typeSpecimenRefPage TO herbTypeSpecimenRefPage; +ALTER TABLE herbtypespecimengroup RENAME COLUMN typeSpecimenBasionym TO herbTypeSpecimenBasionym; +ALTER TABLE herbtypespecimengroup RENAME COLUMN typeSpecimenNotes TO herbTypeSpecimenNotes; + +ALTER TABLE hybridparentgroup RENAME to herbHybridParentGroup; +ALTER TABLE herbHybridParentGroup RENAME COLUMN hybridParent TO herbHybridParent; +ALTER TABLE herbHybridParentGroup RENAME COLUMN hybridParentQualifier TO herbHybridParentQualifier; -- 2.47.3