Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Fix dkan update 7102 (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkinzer authored May 23, 2017
1 parent 4a02f5d commit 5e35842
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 24 deletions.
1 change: 1 addition & 0 deletions build-dkan.make
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ projects[dkan][type] = profile
projects[dkan][download][type] = git
projects[dkan][download][url] = https://github.com/NuCivic/dkan.git
projects[dkan][download][tag] = 7.x-1.13.3
projects[dkan][patch][] = https://patch-diff.githubusercontent.com/raw/NuCivic/dkan/pull/1920.diff
62 changes: 38 additions & 24 deletions dkan/dkan.install
Original file line number Diff line number Diff line change
Expand Up @@ -213,29 +213,43 @@ function dkan_update_7011() {
* Deprecated modules: Conditional Fields, Entity RDF, RDF UI, RDF Extensions.
*/
function dkan_update_7012() {
$modules = array(
'conditional_fields',
'entity_rdf',
'rdfui',
'rdfx',
);
db_delete('system')
->condition('name', $modules, 'IN')
->condition('type', 'module')
->execute();
if (!module_exists('conditional_fields')) {
db_delete('system')
->condition('name', 'conditional_fields')
->condition('type', 'module')
->execute();
db_drop_table('conditional_fields');
}
if (!module_exists('entity_rdf')) {
db_delete('system')
->condition('name', 'entity_rdf')
->condition('type', 'module')
->execute();
}
if (!module_exists('rdfui')) {
db_delete('system')
->condition('name', 'rdfui')
->condition('type', 'module')
->execute();
}
if (!module_exists('rdfx')) {
db_delete('system')
->condition('name', 'rdfx')
->condition('type', 'module')
->execute();

db_drop_table('conditional_fields');
db_drop_table('rdfx_namespaces');
db_drop_table('rdfx_term_details');
db_drop_table('rdfx_term_domains');
db_drop_table('rdfx_term_inverses');
db_drop_table('rdfx_term_ranges');
db_drop_table('rdfx_term_superclasses');
db_drop_table('rdfx_term_superproperties');
db_drop_table('rdfx_term_types');
db_drop_table('rdfx_terms');
db_drop_table('rdfx_vocabulary_details');
db_drop_table('rdfx_vocabulary_graphs');
db_drop_table('rdfx_namespaces');
db_drop_table('rdfx_term_details');
db_drop_table('rdfx_term_domains');
db_drop_table('rdfx_term_inverses');
db_drop_table('rdfx_term_ranges');
db_drop_table('rdfx_term_superclasses');
db_drop_table('rdfx_term_superproperties');
db_drop_table('rdfx_term_types');
db_drop_table('rdfx_terms');
db_drop_table('rdfx_vocabulary_details');
db_drop_table('rdfx_vocabulary_graphs');
}
}

/**
Expand All @@ -253,8 +267,8 @@ function dkan_update_7013() {
}

/**
* Drop the 'field_modified_source_date' field.
*/
* Drop the 'field_modified_source_date' field.
*/
function dkan_update_7014() {
// Mark the field for deletion.
field_delete_field('field_modified_source_date');
Expand Down

0 comments on commit 5e35842

Please sign in to comment.