From 537ad57f87aab9eca7d5432670bc4747b6f81ce9 Mon Sep 17 00:00:00 2001 From: Gustavo Durand Date: Thu, 9 Jun 2022 14:09:52 -0400 Subject: [PATCH 1/2] Create V5.10.1.3__8599-legacy-templates.sql --- .../db/migration/V5.10.1.3__8599-legacy-templates.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/resources/db/migration/V5.10.1.3__8599-legacy-templates.sql diff --git a/src/main/resources/db/migration/V5.10.1.3__8599-legacy-templates.sql b/src/main/resources/db/migration/V5.10.1.3__8599-legacy-templates.sql new file mode 100644 index 00000000000..5027c48df59 --- /dev/null +++ b/src/main/resources/db/migration/V5.10.1.3__8599-legacy-templates.sql @@ -0,0 +1,10 @@ +-- this script finds legacy templates that do not hava an associated termsofuseandaccess +-- and creates / links a termsofuseandaccess to them +with _update as +( +update template set termsofuseandaccess_id = nextval('termsofuseandaccess_id_seq' ) +where termsofuseandaccess_id is null +returning termsofuseandaccess_id +) +insert into termsofuseandaccess (id, fileaccessrequest, license_id) (select termsofuseandaccess_id, false, 1 from _update) + From 19b568dffab289fb3ae36937f390d06f2872b6f1 Mon Sep 17 00:00:00 2001 From: Gustavo Durand Date: Thu, 9 Jun 2022 14:17:51 -0400 Subject: [PATCH 2/2] Create 8599-legacy-templates --- doc/release-notes/8599-legacy-templates | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/release-notes/8599-legacy-templates diff --git a/doc/release-notes/8599-legacy-templates b/doc/release-notes/8599-legacy-templates new file mode 100644 index 00000000000..7285a613635 --- /dev/null +++ b/doc/release-notes/8599-legacy-templates @@ -0,0 +1,5 @@ +Some older legacy templates did not have an associated termsofuseandaccess linked to them. When custom licenses were added, dataverses that these legacy templates as default would not allow the creation of a new dataset (500 error). + +In this release, we run a script that creates a default empty termsofuseandaccess for each of these templates and links them. + +Note the termsofuseandaccess that are created this way default to using the license with id=1 (cc0) and the fileaccessrequest to false.