Skip to content

Commit

Permalink
Merge pull request IQSS#8789 from IQSS/8599-legacy-template-issue
Browse files Browse the repository at this point in the history
8599 legacy template issue
  • Loading branch information
kcondon authored Jun 9, 2022
2 parents daa93ff + 19b568d commit a324b51
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/release-notes/8599-legacy-templates
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit a324b51

Please sign in to comment.