From 71098cb9e54c66a2af620b74d44514e663612cd8 Mon Sep 17 00:00:00 2001 From: Steven Winship <39765413+stevenwinship@users.noreply.github.com> Date: Mon, 17 Jun 2024 14:34:51 -0400 Subject: [PATCH 1/3] adding sql script to convert custom license CC0 Waiver to CC0 1.0 --- .../9081-CC0-waiver-turned-into-custom-license.md | 6 ++++++ src/main/resources/db/migration/V6.2.0.2.sql | 10 ++++++++++ 2 files changed, 16 insertions(+) create mode 100644 doc/release-notes/9081-CC0-waiver-turned-into-custom-license.md create mode 100644 src/main/resources/db/migration/V6.2.0.2.sql diff --git a/doc/release-notes/9081-CC0-waiver-turned-into-custom-license.md b/doc/release-notes/9081-CC0-waiver-turned-into-custom-license.md new file mode 100644 index 00000000000..fed38c73e6c --- /dev/null +++ b/doc/release-notes/9081-CC0-waiver-turned-into-custom-license.md @@ -0,0 +1,6 @@ +In an earlier Dataverse release, Datasets with only 'CC0 Waiver' in termsofuse field were converted to 'Custom License' instead of CC0 1.0 licenses during an automated process. A new process was added to correct this. Only Datasets with no terms other than the one create by the previous process will be modified. +- The existing 'Terms of Use' must be equal to 'This dataset is made available under a Creative Commons CC0 license with the following additional/modified terms and conditions: CC0 Waiver' +- The following terms fields must be empty: Confidentiality Declaration, Special Permissions, Restrictions, Citation Requirements, Depositor Requirements, Conditions, and Disclaimer. +- The License ID must not be assigned. + +This process will set the License ID to that of the CC0 1.0 license and change the termsofuse field back to 'CC0 Waiver', which will be hidden in the UI do to the License ID being set. diff --git a/src/main/resources/db/migration/V6.2.0.2.sql b/src/main/resources/db/migration/V6.2.0.2.sql new file mode 100644 index 00000000000..f5905d586de --- /dev/null +++ b/src/main/resources/db/migration/V6.2.0.2.sql @@ -0,0 +1,10 @@ +UPDATE termsofuseandaccess SET license_id = (SELECT license.id FROM license WHERE license.name = 'CC0 1.0'), termsofuse = 'CC0 Waiver' +WHERE termsofuse = 'This dataset is made available under a Creative Commons CC0 license with the following additional/modified terms and conditions: CC0 Waiver' + AND license_id IS null + AND confidentialitydeclaration IS null + AND specialpermissions IS null + AND restrictions IS null + AND citationrequirements IS null + AND depositorrequirements IS null + AND conditions IS null + AND disclaimer IS null; From 116262c0fdad3a919ad88e76879cd0a1d253cee3 Mon Sep 17 00:00:00 2001 From: Steven Winship <39765413+stevenwinship@users.noreply.github.com> Date: Mon, 17 Jun 2024 15:01:04 -0400 Subject: [PATCH 2/3] change new contents of termofuse field to null --- doc/release-notes/9081-CC0-waiver-turned-into-custom-license.md | 2 +- src/main/resources/db/migration/V6.2.0.2.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/release-notes/9081-CC0-waiver-turned-into-custom-license.md b/doc/release-notes/9081-CC0-waiver-turned-into-custom-license.md index fed38c73e6c..042b2ec39fd 100644 --- a/doc/release-notes/9081-CC0-waiver-turned-into-custom-license.md +++ b/doc/release-notes/9081-CC0-waiver-turned-into-custom-license.md @@ -3,4 +3,4 @@ In an earlier Dataverse release, Datasets with only 'CC0 Waiver' in termsofuse f - The following terms fields must be empty: Confidentiality Declaration, Special Permissions, Restrictions, Citation Requirements, Depositor Requirements, Conditions, and Disclaimer. - The License ID must not be assigned. -This process will set the License ID to that of the CC0 1.0 license and change the termsofuse field back to 'CC0 Waiver', which will be hidden in the UI do to the License ID being set. +This process will set the License ID to that of the CC0 1.0 license and remove the contents of termsofuse field. diff --git a/src/main/resources/db/migration/V6.2.0.2.sql b/src/main/resources/db/migration/V6.2.0.2.sql index f5905d586de..fd9cd823868 100644 --- a/src/main/resources/db/migration/V6.2.0.2.sql +++ b/src/main/resources/db/migration/V6.2.0.2.sql @@ -1,4 +1,4 @@ -UPDATE termsofuseandaccess SET license_id = (SELECT license.id FROM license WHERE license.name = 'CC0 1.0'), termsofuse = 'CC0 Waiver' +UPDATE termsofuseandaccess SET license_id = (SELECT license.id FROM license WHERE license.name = 'CC0 1.0'), termsofuse = NULL WHERE termsofuse = 'This dataset is made available under a Creative Commons CC0 license with the following additional/modified terms and conditions: CC0 Waiver' AND license_id IS null AND confidentialitydeclaration IS null From db19451409521f5c319a0ccefecc5ae2aa28a555 Mon Sep 17 00:00:00 2001 From: Steven Winship <39765413+stevenwinship@users.noreply.github.com> Date: Mon, 15 Jul 2024 11:21:30 -0400 Subject: [PATCH 3/3] renamed script from 6.2 to 6.3 --- src/main/resources/db/migration/{V6.2.0.2.sql => V6.3.0.1.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/db/migration/{V6.2.0.2.sql => V6.3.0.1.sql} (100%) diff --git a/src/main/resources/db/migration/V6.2.0.2.sql b/src/main/resources/db/migration/V6.3.0.1.sql similarity index 100% rename from src/main/resources/db/migration/V6.2.0.2.sql rename to src/main/resources/db/migration/V6.3.0.1.sql