Revision 50724
Added by Claudio Atzori about 6 years ago
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/patch-db/migrate_dsm.sql | ||
---|---|---|
167 | 167 |
op.pid |
168 | 168 |
FROM organizationpids op; |
169 | 169 |
|
170 |
-- !!!!! data insert complete !!!!! |
|
171 |
-- TODO add below the deletion statements for the old tables. |
|
172 | 170 |
|
171 |
-- Migrate the managed status |
|
172 |
update dsm_datasources d set d.managed = true where d.id in ( |
|
173 |
SELECT d.id |
|
174 |
FROM dsm_datasources d |
|
175 |
LEFT OUTER JOIN dsm_api a ON (d.id = a.datasource) |
|
176 |
LEFT OUTER JOIN apicollections ap ON (ap.api = a.id) |
|
177 |
WHERE a.active = TRUE |
|
178 |
OR a.removable = TRUE |
|
179 |
OR ap.edited IS NOT NULL |
|
180 |
GROUP BY d.id ); |
|
173 | 181 |
|
174 | 182 |
|
183 |
-- !!!!! data insert complete !!!!! |
|
175 | 184 |
|
176 | 185 |
|
186 |
delete from organizations where id like 'opendoar%' ; |
|
187 |
delete from organizations where id like 're3data%' ; |
|
188 |
delete from organizations where collectedfrom is null ; |
|
177 | 189 |
|
190 |
delete from dsm_organizations where collectedfrom = 'openaire____::corda' ; |
|
191 |
delete from dsm_organizations where collectedfrom = 'openaire____::snsf' ; |
|
192 |
delete from dsm_organizations where collectedfrom = 'openaire____::conicytf' ; |
|
193 |
delete from dsm_organizations where collectedfrom = 'openaire____::irb_hr' ; |
|
194 |
delete from dsm_organizations where collectedfrom = 'openaire____::fwf' ; |
|
195 |
delete from dsm_organizations where collectedfrom = 'openaire____::sfi' ; |
|
196 |
delete from dsm_organizations where collectedfrom = 'openaire____::wellcometrust' ; |
|
197 |
delete from dsm_organizations where collectedfrom = 'openaire____::nsf' ; |
|
198 |
delete from dsm_organizations where collectedfrom = 'openaire____::corda_h2020' ; |
|
178 | 199 |
|
179 | 200 |
|
180 | 201 |
|
... | ... | |
183 | 204 |
|
184 | 205 |
|
185 | 206 |
|
186 |
|
|
187 |
|
|
188 |
|
|
189 |
|
|
190 |
|
modules/dnet-openaireplus-workflows/trunk/pom.xml | ||
---|---|---|
3 | 3 |
<parent> |
4 | 4 |
<groupId>eu.dnetlib</groupId> |
5 | 5 |
<artifactId>dnet45-parent</artifactId> |
6 |
<version>1.0.0-SNAPSHOT</version>
|
|
6 |
<version>1.0.0</version> |
|
7 | 7 |
<relativePath /> |
8 | 8 |
</parent> |
9 | 9 |
<modelVersion>4.0.0</modelVersion> |
Also available in: Unified diff
depending on released parent