Project

General

Profile

« Previous | Next » 

Revision 61029

Added by Alessia Bardi over 1 year ago

Do not prepend PIC to the PIC number, as requested by the EC DG staff member

View differences:

modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/patch-db/patch-pics.sql
1
BEGIN;
2
-- Add constraint to FK
3
ALTER TABLE dsm_organizationpids DROP CONSTRAINT dsm_organizationpids_pid_fkey;
4
ALTER TABLE dsm_organizationpids ADD CONSTRAINT dsm_organizationpids_pid_fkey
5
  FOREIGN KEY (pid) REFERENCES dsm_identities (pid)
6
  ON UPDATE CASCADE;
7
  -- Update
8
  UPDATE dsm_identities
9
  set pid = substring(pid,5)
10
  where issuertype ='PIC';
11
  -- Add original FK
12
  ALTER TABLE dsm_organizationpids DROP CONSTRAINT dsm_organizationpids_pid_fkey;
13
  ALTER TABLE dsm_organizationpids ADD CONSTRAINT dsm_organizationpids_pid_fkey
14
    FOREIGN KEY (pid) REFERENCES dsm_identities (pid);
15
COMMIT
16
;
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/funders/corda_2_db.xml
277 277
                                <xsl:value-of select="0.8"/>
278 278
                            </FIELD>
279 279
                        </ROW>
280
                        <xsl:variable name="organizationPIC" select="concat('PIC:', ./OrganisationPIC)"/>
280
                        <xsl:variable name="organizationPIC" select="./OrganisationPIC"/>
281 281
                         <ROW table="dsm_identities">
282 282
                            <FIELD name="_dnet_resource_identifier_">
283 283
                                <xsl:value-of
284
                                        select="concat(./OrganisationPIC, '@@PIC')"/>
284
                                        select="concat($organizationPIC, '@@PIC')"/>
285 285
                            </FIELD>
286 286
                            <FIELD name="pid">
287 287
                                <xsl:value-of select="$organizationPIC"/>
modules/dnet-openaireplus-profiles/trunk/src/main/resources/eu/dnetlib/test/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/funders/cordah2020_2_db.xml
224 224
								</FIELD>
225 225
							</ROW>
226 226

  
227
						 <xsl:variable name="organizationPIC" select="concat('PIC:', ./OrganisationPIC)"/>
227
						 <xsl:variable name="organizationPIC" select="./OrganisationPIC"/>
228 228
                         <ROW table="dsm_identities">
229 229
                            <FIELD name="_dnet_resource_identifier_">
230 230
                                <xsl:value-of

Also available in: Unified diff