Project

General

Profile

« Previous | Next » 

Revision 53133

updated materialised view update script. Adjusted db mgration procedure.

View differences:

migrate_dsm.sql
1
-- noinspection SqlNoDataSourceInspectionForFile
2

  
1 3
-- cleanup the unnecessary functions: the following SQL produces the deletion statement list
2
SELECT 'DROP FUNCTION ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ');'
4
SELECT 'DROP FUNCTION ' || ns.nspname || '.' || proname || '(' || oidvectortypes(proargtypes) || ') CASCADE;'
3 5
FROM pg_proc
4 6
	INNER JOIN pg_namespace ns ON (pg_proc.pronamespace = ns.oid)
5 7
WHERE ns.nspname = 'public'
......
115 117
where	param != 'baseUrl' AND accessparam is true;
116 118

  
117 119

  
118
ALTER TABLE dsm_organizations ALTER COLUMN websiteurl TYPE text;
119

  
120 120
INSERT INTO dsm_organizations (id, legalshortname,legalname,websiteurl, logourl,ec_legalbody, ec_legalperson, ec_nonprofit, ec_researchorganization, ec_highereducation, ec_internationalorganizationeurinterests,
121 121
                               ec_internationalorganization, ec_enterprise, ec_smevalidated, ec_nutscode, country, collectedfrom, dateofcollection, provenanceaction)
122 122
	SELECT
......
169 169

  
170 170

  
171 171
-- Migrate the managed status
172
update dsm_datasources d set d.managed = true where d.id in (
172
update dsm_datasources d set managed = true where d.id in (
173 173
	SELECT d.id
174 174
	FROM dsm_datasources d
175 175
	LEFT OUTER JOIN dsm_api a ON (d.id = a.datasource)

Also available in: Unified diff