Browse Source

Cleaned up legacy modules so they can be enabled.

Chun-Huai Cheng 9 years ago
parent
commit
66f6cd2dc3

+ 0 - 111
legacy/tripal_analysis/tripal_analysis.install

@@ -288,114 +288,3 @@ function tripal_analysis_add_mview_analysis_organism() {
   // add the view
   tripal_add_mview($view_name, 'tripal_analysis', $schema, $sql, $comment);
 }
-
-/**
- * This is the required update for tripal_organism when upgrading from Drupal core API 6.x.
- *
- */
-function tripal_analysis_update_7200() {
-  // We cannot use the Tripal API calls in the 7200 update
-  // because during upgrade the tripal_core should also be disabled
-
-  // set the analysis_property as default
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'analysis_property'")->fetchField();
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-        'table_name' => 'analysisprop',
-        'field_name' => 'type_id',
-        'cv_id' => $cv_id
-      ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to add analysis_property vocabulary: '. $error);
-  }
-
-
-  // During the upgrade from D6 to D7 the vocabulary terms assigned to organisms were
-  // copied to the field_data_taxonomyextra table rather than to the correct
-  // field_data_taxonomy_vocabulary_[vid] table. We'll move them.
-  $vid = db_query("SELECT vid FROM {taxonomy_vocabulary} WHERE name = 'Analysis'")->fetchField();
-  if ($vid) {
-    try {
-      // first move from the field_data_taxonomyextra table
-      $sql = "
-        INSERT INTO {field_data_taxonomy_vocabulary_$vid}
-          (entity_type, bundle, deleted, entity_id, revision_id, language, delta, taxonomy_vocabulary_" . $vid. "_tid)
-        (SELECT entity_type, bundle, deleted, entity_id, revision_id, language, delta, taxonomyextra_tid
-         FROM field_data_taxonomyextra
-         WHERE bundle = 'chado_feature')
-      ";
-      db_query($sql);
-      $sql = "DELETE FROM field_data_taxonomyextra WHERE bundle = 'chado_analysis'";
-      db_query($sql);
-
-      // next move from the field_revision_taxonomyextra table
-      $sql = "
-        INSERT INTO {field_revision_taxonomy_vocabulary_$vid}
-          (entity_type, bundle, deleted, entity_id, revision_id, language, delta, taxonomy_vocabulary_" . $vid. "_tid)
-        (SELECT entity_type, bundle, deleted, entity_id, revision_id, language, delta, taxonomyextra_tid
-         FROM field_revision_taxonomyextra
-         WHERE bundle = 'chado_feature')
-      ";
-      db_query($sql);
-      $sql = "DELETE FROM field_revision_taxonomyextra WHERE bundle = 'chado_analysis'";
-      db_query($sql);
-    }
-    catch (\PDOException $e) {
-      $error = $e->getMessage();
-      throw new DrupalUpdateException('Could not move organism taxonomy terms: '. $error);
-    }
-  }
-}
-
-/**
- * Implementation of hook_update_dependencies().  It specifies a list of
- * other modules whose updates must be run prior to this one.
- */
-function tripal_analysis_update_dependencies() {
-  $dependencies = array();
-
-  // the tripal_cv update 7200 must run prior to update 7200 of this module
-  $dependencies['tripal_analysis'][7200] = array(
-    'tripal_cv' => 7200
-  );
-
-  return $dependencies;
-}
-
-/**
- * Fixes an error with the materialized view installation
- *
- */
-function tripal_analysis_update_7201() {
-
-  // there is a bug in the Tripal v2.0-alpha release that didn't add the
-  // materialized view schema to the mviews table.
-  // get the schema for the materialized view from the custom_tables table
-  // as there is a copy there, but only if the schema is missing from the
-  // materialized view table
-  $view_name = 'analysis_organism';
-  $schema = db_select('tripal_mviews', 'tm')
-    ->fields('tm', array('mv_schema'))
-    ->condition('name', $view_name)
-    ->execute()
-    ->fetchField();
-  if (!$schema or $schema == 'Array') {
-    $schema = db_select('tripal_custom_tables', 'tct')
-      ->fields('tct', array('schema'))
-      ->condition('table_name', $view_name)
-      ->execute()
-      ->fetchField();
-    $schema_str = var_export(unserialize($schema), TRUE);
-    $schema_str = preg_replace('/=>\s+\n\s+array/', '=> array', $schema_str);
-    db_update('tripal_mviews')
-      ->fields(array(
-        'mv_schema' => $schema_str
-      ))
-      ->condition('name', $view_name)
-      ->execute();
-  }
-}

+ 5 - 4
legacy/tripal_analysis/tripal_analysis.module

@@ -7,8 +7,6 @@
  * @ingroup tripal_analysis
  */
 
-require_once 'api/tripal_analysis.api.inc';
-require_once 'api/tripal_analysis.schema.api.inc';
 require_once 'api/tripal_analysis.DEPRECATED.inc';
 
 require_once 'includes/tripal_analysis.delete.inc';
@@ -42,8 +40,9 @@ function tripal_analysis_init() {
  * @ingroup tripal_analysis
  */
 function tripal_analysis_menu() {
-
+  $items = array();
   // Tripal Analysis administrative settings
+  /*
   $items['admin/tripal/chado/tripal_analysis'] = array(
     'title' => 'Analyses',
     'description' => 'A bioinformatics analysis producing features.',
@@ -103,7 +102,7 @@ function tripal_analysis_menu() {
     'file path' => drupal_get_path('module', 'tripal_core'),
     'weight' => 3
   );
-  
+  */
   return $items;
 }
 
@@ -146,6 +145,7 @@ function tripal_analysis_help ($path, $arg) {
  */
 function tripal_analysis_permission() {
   return array(
+    /*
     'access chado_analysis content' => array(
       'title' => t('View Analyses'),
       'description' => t('Allow users to view analysis pages.'),
@@ -166,6 +166,7 @@ function tripal_analysis_permission() {
       'title' => t('Administer Analyses'),
       'description' => t('Allow users to administer all analyses.'),
     ),
+    */
   );
 }
 

+ 0 - 180
legacy/tripal_contact/tripal_contact.install

@@ -233,183 +233,3 @@ function tripal_contact_add_custom_tables(){
   );
   chado_create_custom_table('contactprop', $schema, TRUE);
 }
-
-/**
- * This is the required update for tripal_contact when upgrading from Drupal core API 6.x.
- *
- */
-function tripal_contact_update_7200() {
-
-  // We cannot use the Tripal API calls in the 7200 update
-  // because during upgrade the tripal_core will be disabled
-
-  // add the contact_type CV
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'tripal_contact'")->fetchField();
-    if (!$cv_id) {
-      // add the vocabulary
-      $cv_id = db_insert('chado.cv')
-      ->fields(array(
-        'name' => 'tripal_contact',
-        'definition' => 'A heirarchical set of terms for describing a contact. It is intended to be used as the default vocabularies in Tripal for contact types and contact properties.'
-      ))
-      ->execute();
-    }
-    // make this CV the defaults for the contact properties and contact types
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-         'table_name' => 'contact',
-         'field_name' => 'type_id',
-         'cv_id' => $cv_id
-       ))
-      ->execute();
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-        'table_name' => 'contactprop',
-        'field_name' => 'type_id',
-        'cv_id' => $cv_id
-      ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to add tripal_contact vocabulary: '. $error);
-  }
-
-
-  // add the contact_relationship CV
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'contact_relationship'")->fetchField();
-    if (!$cv_id) {
-      // add the vocabulary
-      $cv_id = db_insert('chado.cv')
-      ->fields(array(
-        'name' => 'contact_relationship',
-        'definition' => 'Contains types of relationships between contacts.'
-      ))
-      ->execute();
-    }
-    // add the default
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-        'table_name' => 'contact_relationship',
-        'field_name' => 'type_id',
-        'cv_id' => $cv_id
-        ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to add contact_type vocabulary: '. $error);
-  }
-
-  // add the contact_type CV
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'contact_type'")->fetchField();
-    if (!$cv_id) {
-      // add the vocabulary
-      $cv_id = db_insert('chado.cv')
-      ->fields(array(
-        'name' => 'contact_type',
-        'definition' => 'Contains types of contacts. This can be used if the tripal_contact vocabulary (which is default for contacts in Tripal) is not desired.'
-      ))
-      ->execute();
-    }
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to add contact_type vocabulary: '. $error);
-  }
-
-  // add the contact_property CV
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'contact_property'")->fetchField();
-    if (!$cv_id) {
-      // add the vocabulary
-      $cv_id = db_insert('chado.cv')
-      ->fields(array(
-        'name' => 'contact_property',
-        'definition' => 'Contains properties for contacts. This can be used if the tripal_contact vocabulary (which is default for contacts in Tripal) is not desired.'
-      ))
-      ->execute();
-    }
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to add contact_property vocabulary: '. $error);
-  }
-}
-
-/**
- * Implementation of hook_update_dependencies().  It specifies a list of
- * other modules whose updates must be run prior to this one.
- */
-function tripal_contact_update_dependencies() {
-  $dependencies = array();
-
-  // the tripal_cv update 7200 must run prior to update 7200 of this module
-  $dependencies['tripal_contact'][7200] = array(
-    'tripal_cv' => 7200
-  );
-
-  return $dependencies;
-}
-
-/**
- * Adds missing foreign key constraints
- *
- */
-function tripal_contact_update_7201() {
-  // there was a bug in the function for creating a custom table that
-  // kept foreign key constraints from being added.  So, we need to add those
-  // to keep from error messages appear, we will drop the FK if it already
-  // exists and then re-add it.
-  try {
-    $fkey_exists = db_query('SELECT TRUE FROM pg_constraint WHERE conname = :constraint', array(':constraint' => 'contactprop_type_id_fkey'))->fetchField();
-    if ($fkey_exists) {
-      db_query('
-        ALTER TABLE chado.contactprop
-        DROP CONSTRAINT contactprop_type_id_fkey CASCADE
-      ');
-      db_query('
-        ALTER TABLE chado.contactprop
-        DROP CONSTRAINT contactprop_contact_id_fkey CASCADE
-      ');
-    }
-    db_query('
-      ALTER TABLE chado.contactprop
-      ADD CONSTRAINT contactprop_type_id_fkey
-      FOREIGN KEY (type_id) REFERENCES chado.cvterm (cvterm_id)
-      ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
-    ');
-    db_query('
-      ALTER TABLE chado.contactprop
-      ADD CONSTRAINT contactprop_contact_id_fkey
-      FOREIGN KEY (contact_id) REFERENCES chado.contact (contact_id)
-      ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
-    ');
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to update foriegn key: '. $error);
-  }
-}
-/**
- * Updates path of tripal_contact OBO to be relative.
- */
-function tripal_contact_update_7202() {
-  try {
-    // Remove duplicates.
-    db_delete('tripal_cv_obo')
-      ->condition('name', 'Tripal Contacts')
-      ->execute();
-
-    // Add in the updated path.
-    $obo_path = '{tripal_contact}/files/tcontact.obo';
-    $obo_id = tripal_insert_obo('Tripal Contacts', $obo_path);
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to update tripal_contact OBO path: '. $error);
-  }
-}

+ 4 - 2
legacy/tripal_contact/tripal_contact.module

@@ -14,7 +14,6 @@
  * @}
  */
 
-require_once 'api/tripal_contact.api.inc';
 require_once 'api/tripal_contact.DEPRECATED.inc';
 
 require_once 'theme/tripal_contact.theme.inc';
@@ -50,7 +49,7 @@ function tripal_contact_views_api() {
 function tripal_contact_menu() {
 
   $items = array();
-
+  /*
   $items['admin/tripal/chado/tripal_contact']= array(
     'title' => 'Contacts',
     'description' => ('Model persons, institutes, groups, organizations, etc.'),
@@ -108,6 +107,7 @@ function tripal_contact_menu() {
     'access arguments' => array('administer tripal contact'),
     'type' => MENU_CALLBACK,
   );
+  */
   return $items;
 }
 
@@ -186,6 +186,7 @@ function tripal_contact_theme($existing, $type, $theme, $path) {
  */
 function tripal_contact_permission() {
   return array(
+    /*
     'access chado_contact content' => array(
       'title' => t('View Contacts'),
       'description' => t('Allow users to view contact pages.'),
@@ -206,6 +207,7 @@ function tripal_contact_permission() {
       'title' => t('Administer Contacts'),
       'description' => t('Allow users to administer all contacts.'),
     ),
+    */
   );
 }
 

+ 0 - 194
legacy/tripal_feature/tripal_feature.install

@@ -335,197 +335,3 @@ function tripal_feature_add_cvs() {
     'The Sequence Ontology'
   );
 }
-
-/**
- * This is the required update for tripal_feature when upgrading from Drupal core API 6.x.
- * This update may take some time to complete.
- */
-function tripal_feature_update_7200() {
-  // During the upgrade from D6 to D7 the vocabulary terms assigned to features were
-  // copied to the field_data_taxonomyextra table rather than to the correct
-  // field_data_taxonomy_vocabulary_[vid] table. We'll move them.
-  $vid = db_query("SELECT vid FROM {taxonomy_vocabulary} WHERE name = 'Feature Type'")->fetchField();
-  if ($vid) {
-    try {
-      // first move from the field_data_taxonomyextra table
-      $sql = "
-        INSERT INTO {field_data_taxonomy_vocabulary_$vid}
-          (entity_type, bundle, deleted, entity_id, revision_id, language, delta, taxonomy_vocabulary_" . $vid. "_tid)
-        (SELECT entity_type, bundle, deleted, entity_id, revision_id, language, delta, taxonomyextra_tid
-         FROM field_data_taxonomyextra
-         WHERE bundle = 'chado_feature')
-      ";
-      db_query($sql);
-      $sql = "DELETE FROM field_data_taxonomyextra WHERE bundle = 'chado_feature'";
-      db_query($sql);
-
-      // next move from the field_revision_taxonomyextra table
-      $sql = "
-        INSERT INTO {field_revision_taxonomy_vocabulary_$vid}
-          (entity_type, bundle, deleted, entity_id, revision_id, language, delta, taxonomy_vocabulary_" . $vid. "_tid)
-        (SELECT entity_type, bundle, deleted, entity_id, revision_id, language, delta, taxonomyextra_tid
-         FROM field_revision_taxonomyextra
-         WHERE bundle = 'chado_feature')
-      ";
-      db_query($sql);
-      $sql = "DELETE FROM field_revision_taxonomyextra WHERE bundle = 'chado_feature'";
-      db_query($sql);
-    }
-    catch (\PDOException $e) {
-      $error = $e->getMessage();
-      throw new DrupalUpdateException('Could not move feature taxonomy terms: '. $error);
-    }
-  }
-
-  // set the default feature property vocabulary
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'feature_property'")->fetchField();
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-        'table_name' => 'featureprop',
-        'field_name' => 'type_id',
-        'cv_id' => $cv_id
-        ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to set feature_property vocabulary as default: '. $error);
-  }
-
-  // add the feature_relationshp CV
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'feature_relationship'")->fetchField();
-    if (!$cv_id) {
-      // add the vocabulary
-      $cv_id = db_insert('chado.cv')
-      ->fields(array(
-        'name' => 'feature_relationship',
-        'definition' => 'Contains types of relationships between features.'
-      ))
-      ->execute();
-    }
-    // use the new feature_relationship CV we just added
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-        'table_name' => 'feature_relationship',
-        'field_name' => 'type_id',
-        'cv_id' => $cv_id
-      ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to add feature_relationship vocabulary: '. $error);
-  }
-
-  // set the feature_type as the 'sequence' ontology
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'sequence'")->fetchField();
-    if (!$cv_id) {
-      // add the vocabulary
-      $cv_id = db_insert('chado.cv')
-      ->fields(array(
-        'name' => 'sequence',
-        'definition' => 'The Sequence Ontology.'
-      ))
-      ->execute();
-    }
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-        'table_name' => 'feature',
-        'field_name' => 'type_id',
-        'cv_id' => $cv_id
-      ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to add sequence vocabulary which will be used for the sequence ontology: '. $error);
-  }
-
-
-}
-
-/**
- * Implementation of hook_update_dependencies().  It specifies a list of
- * other modules whose updates must be run prior to this one.
- */
-function tripal_feature_update_dependencies() {
-  $dependencies = array();
-
-  // the tripal_cv update 7200 must run prior to update 7200 of this module
-  $dependencies['tripal_feature'][7200] = array(
-    'tripal_cv' => 7200
-  );
-
-  return $dependencies;
-}
-
-/**
- * Fixes an error with the materialized view installation
- *
- */
-function tripal_feature_update_7201() {
-
-  try {
-    // there is a bug in the Tripal v2.0-alpha release that didn't add the
-    // materialized view schema to the mviews table.
-    // get the schema for the materialized view from the custom_tables table
-    // as there is a copy there, but only if the schema is missing from the
-    // materialized view table
-    $view_name = 'organism_feature_count';
-    $schema = db_select('tripal_mviews', 'tm')
-      ->fields('tm', array('mv_schema'))
-      ->condition('name', $view_name)
-      ->execute()
-      ->fetchField();
-    if (!$schema or $schema == 'Array') {
-      $schema = db_select('tripal_custom_tables', 'tct')
-        ->fields('tct', array('schema'))
-        ->condition('table_name', $view_name)
-        ->execute()
-        ->fetchField();
-      $schema_str = var_export(unserialize($schema), TRUE);
-      $schema_str = preg_replace('/=>\s+\n\s+array/', '=> array', $schema_str);
-      db_update('tripal_mviews')
-        ->fields(array(
-        'mv_schema' => $schema_str
-        ))
-        ->condition('name', $view_name)
-        ->execute();
-    }
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to complete update' . $error);
-  }
-}
-
-/**
- * Adds the temporary tables used for loading GFF files.
- */
-function tripal_feature_update_7202() {
-  try {
-    tripal_feature_add_tripal_gff_temp_table();
-    tripal_feature_add_tripal_gffcds_temp_table();
-    tripal_feature_add_tripal_gffprotein_temp_table();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to complete update' . $error);
-  }
-}
-
-/**
- * Removes the unique constraint on the tripal_gffcds_temp table.
- */
-function tripal_feature_update_7203() {
-  try {
-    tripal_feature_add_tripal_gffcds_temp_table(FALSE);
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to complete update' . $error);
-  }
-}

+ 4 - 23
legacy/tripal_feature/tripal_feature.module

@@ -12,15 +12,11 @@
  * @}
  */
 
-require_once 'api/tripal_feature.api.inc';
 require_once 'api/tripal_feature.DEPRECATED.inc';
 
 require_once 'theme/tripal_feature.theme.inc';
 
 require_once 'includes/tripal_feature.admin.inc';
-require_once 'includes/tripal_feature.fasta_loader.inc';
-require_once 'includes/tripal_feature.gff_loader.inc';
-require_once 'includes/tripal_feature.seq_extract.inc';
 require_once 'includes/tripal_feature.delete.inc';
 require_once 'includes/tripal_feature.chado_node.inc';
 
@@ -75,6 +71,7 @@ function tripal_feature_help($path, $arg) {
  */
 function tripal_feature_permission() {
   return array(
+    /*
     'access chado_feature content' => array(
       'title' => t('View Features'),
       'description' => t('Allow users to view feature pages.'),
@@ -95,6 +92,7 @@ function tripal_feature_permission() {
       'title' => t('Administer Features'),
       'description' => t('Allow users to administer all features.'),
     ),
+    */
   );
 }
 
@@ -135,6 +133,7 @@ function tripal_feature_menu() {
   );
 
   // the administative settings menu
+  /*
   $items['admin/tripal/chado/tripal_feature'] = array(
     'title' => 'Features',
     'description' => 'A biological sequence or a section of a biological sequence, or a collection of such sections.',
@@ -191,24 +190,6 @@ function tripal_feature_menu() {
     'weight' =>  10
   );
 
-  /** Loaders */
-  $items['admin/tripal/loaders/fasta_loader'] = array(
-    'title' => 'FASTA file Loader',
-    'description' => 'Load sequences from a multi-FASTA file into Chado',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_feature_fasta_load_form'),
-    'access arguments' => array('administer tripal feature'),
-    'type' => MENU_NORMAL_ITEM,
-  );
-  $items['admin/tripal/loaders/gff3_load'] = array(
-    'title' => 'GFF3 file Loader',
-    'description' => 'Import a GFF3 file into Chado',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_feature_gff3_load_form'),
-    'access arguments' => array('administer tripal feature'),
-    'type' => MENU_NORMAL_ITEM,
-  );
-
   // Enable admin view
   $items['admin/tripal/chado/tripal_feature/views/features/enable'] = array(
     'title' => 'Enable feature Administrative View',
@@ -217,7 +198,7 @@ function tripal_feature_menu() {
     'access arguments' => array('administer tripal feature'),
     'type' => MENU_CALLBACK,
   );
-
+  */
   return $items;
 }
 

+ 1 - 177
legacy/tripal_featuremap/tripal_featuremap.install

@@ -482,180 +482,4 @@ function tripal_featuremap_add_custom_tables(){
     ),
   );
   chado_create_custom_table('featureposprop', $schema, TRUE);
-}
-
-
-/**
- * This is the required update for tripal_featuremap when upgrading from Drupal core API 6.x.
- * This update may take some time to complete.
- */
-function tripal_featuremap_update_7200() {
-  // We can't use the Tripal API during an upgrade from D6 to D7 Tripal  because the tripal_core
-  // module is disabled. So, we have to manually make database additions/changes to chado.
-
-  // set the default vocabularies
-  // featuremap_units
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'featuremap_units'")->fetchField();
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-        'table_name' => 'featuremap',
-        'field_name' => 'unittype_id',
-        'cv_id' => $cv_id
-      ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to set featuremap_units vocabulary as default: '. $error);
-  }
-
-  // featurepos_property
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'featurepos_property'")->fetchField();
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-        'table_name' => 'featureposprop',
-        'field_name' => 'type_id',
-        'cv_id' => $cv_id
-      ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to set featurepos_property vocabulary as default: '. $error);
-  }
-
-  // featuremap_property
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'featuremap_property'")->fetchField();
-    db_insert('tripal_cv_defaults')
-     ->fields(array(
-       'table_name' => 'featuremapprop',
-       'field_name' => 'type_id',
-       'cv_id' => $cv_id
-      ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to set featuremap_property vocabulary as default: '. $error);
-  }
-
-}
-
-/**
- * Implementation of hook_update_dependencies().  It specifies a list of
- * other modules whose updates must be run prior to this one.
- */
-function tripal_featuremap_update_dependencies() {
-  $dependencies = array();
-
-  // the tripal_cv update 7200 must run prior to update 7200 of this module
-  $dependencies['tripal_featuremap'][7200] = array(
-    'tripal_cv' => 7200
-  );
-
-  return $dependencies;
-}
-
-/**
- * Adds missing foreign key constraints
- *
- */
-function tripal_featuremap_update_7201() {
-  // there was a bug in the function for creating a custom table that
-  // kept foreign key constraints from being added.  So, we need to add those
-  // to keep from error messages appear, we will drop the FK if it already
-  // exists and then re-add it.
-  try {
-    $fkey_exists = db_query('SELECT TRUE FROM pg_constraint WHERE conname = :constraint', array(':constraint' => 'featuremapprop_type_id_fkey'))->fetchField();
-    if ($fkey_exists) {
-      // featuremapprop table
-      db_query('
-        ALTER TABLE chado.featuremapprop
-        DROP CONSTRAINT featuremapprop_type_id_fkey CASCADE
-      ');
-      db_query('
-        ALTER TABLE chado.featuremapprop
-        DROP CONSTRAINT featuremapprop_featuremap_id_fkey CASCADE
-      ');
-    }
-    db_query('
-      ALTER TABLE chado.featuremapprop
-      ADD CONSTRAINT featuremapprop_type_id_fkey
-      FOREIGN KEY (type_id) REFERENCES chado.cvterm (cvterm_id)
-      ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
-    ');
-    db_query('
-      ALTER TABLE chado.featuremapprop
-      ADD CONSTRAINT featuremapprop_featuremap_id_fkey
-      FOREIGN KEY (featuremap_id) REFERENCES chado.featuremap (featuremap_id)
-      ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
-    ');
-
-    // featuremap_dbref table
-    if ($fkey_exists) {
-      db_query('
-        ALTER TABLE chado.featuremap_dbxref
-        DROP CONSTRAINT featuremap_dbxref_dbxref_id_fkey CASCADE
-      ');
-      db_query('
-        ALTER TABLE chado.featuremap_dbxref
-        DROP CONSTRAINT featuremap_dbxref_featuremap_id_fkey CASCADE
-      ');
-    }
-    db_query('
-      ALTER TABLE chado.featuremap_dbxref
-      ADD CONSTRAINT featuremap_dbxref_dbxref_id_fkey
-      FOREIGN KEY (dbxref_id) REFERENCES chado.dbxref (dbxref_id)
-      ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
-    ');
-    db_query('
-      ALTER TABLE chado.featuremap_dbxref
-      ADD CONSTRAINT featuremap_dbxref_featuremap_id_fkey
-      FOREIGN KEY (featuremap_id) REFERENCES chado.featuremap (featuremap_id)
-      ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
-    ');
-
-    // featureposprop
-    if ($fkey_exists) {
-      db_query('
-        ALTER TABLE chado.featureposprop
-        DROP CONSTRAINT featureposprop_type_id_fkey CASCADE
-      ');
-      db_query('
-        ALTER TABLE chado.featureposprop
-        DROP CONSTRAINT featureposprop_featurepos_id_fkey CASCADE
-      ');
-    }
-    db_query('
-      ALTER TABLE chado.featureposprop
-      ADD CONSTRAINT featureposprop_type_id_fkey
-      FOREIGN KEY (type_id) REFERENCES chado.cvterm (cvterm_id)
-      ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
-    ');
-    db_query('
-      ALTER TABLE chado.featureposprop
-      ADD CONSTRAINT featureposprop_featurepos_id_fkey
-      FOREIGN KEY (featurepos_id) REFERENCES chado.featurepos (featurepos_id)
-      ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
-    ');
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to update foriegn key: '. $error);
-  }
-}
-/**
- * Fixes a typo when setting the default CV for the unittype_id field of the featuremap table.
- */
-function tripal_featuremap_update_7202() {
-  try {
-    tripal_set_default_cv('featuremap', 'unittype_id', 'featuremap_units');
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to update featurmap CV default: '. $error);
-  }
-}
+}

+ 4 - 1
legacy/tripal_featuremap/tripal_featuremap.module

@@ -55,6 +55,7 @@ function tripal_featuremap_help($path, $arg) {
  */
 function tripal_featuremap_permission() {
   return array(
+    /*
     'access chado_featuremap content' => array(
       'title' => t('View Maps'),
       'description' => t('Allow users to view map pages.'),
@@ -75,6 +76,7 @@ function tripal_featuremap_permission() {
       'title' => t('Administer Maps'),
       'description' => t('Allow users to administer all maps.'),
     ),
+    */
   );
 }
 
@@ -91,6 +93,7 @@ function tripal_featuremap_menu() {
   $items = array();
 
   // The administative settings menu
+  /*
   $items['admin/tripal/chado/tripal_featuremap'] = array(
     'title' => 'Feature Maps',
     'description' => 'A map of features from the chado database (e.g. genetic map)',
@@ -148,7 +151,7 @@ function tripal_featuremap_menu() {
     'access arguments' => array('administer tripal featuremap'),
     'type' => MENU_CALLBACK,
   );
-
+  */
   return $items;
 }
 

+ 4 - 1
legacy/tripal_genetic/tripal_genetic.module

@@ -14,7 +14,6 @@
 
 require_once 'theme/tripal_genetic.theme.inc';
 
-require_once 'includes/tripal_genetic.schema.inc';
 require_once 'includes/tripal_genetic.admin.inc';
 
 /**
@@ -27,10 +26,12 @@ require_once 'includes/tripal_genetic.admin.inc';
  */
 function tripal_genetic_permission() {
   return array(
+    /*
     'administer tripal genetic' => array(
       'title' => t('Administer Genetic Module'),
       'description' => t('Allow users to administer the genetic module.'),
     ),
+    */
   );
 }
 
@@ -47,6 +48,7 @@ function tripal_genetic_menu() {
   $items = array();
 
     // the administative settings menu
+    /*
   $items['admin/tripal/chado/tripal_genetic'] = array(
    'title' => 'Genetics',
    'description' => 'Genetic data including Genotypes.',
@@ -71,6 +73,7 @@ function tripal_genetic_menu() {
     'access arguments' => array('administer tripal genetic'),
     'type' => MENU_CALLBACK,
   );
+  */
 
   return $items;
 }

+ 4 - 2
legacy/tripal_natural_diversity/tripal_natural_diversity.module

@@ -6,7 +6,6 @@
 
 require_once 'theme/tripal_natural_diversity.theme.inc';
 
-require_once 'includes/tripal_natural_diversity.schema.inc';
 require_once 'includes/tripal_natural_diversity.admin.inc';
 
 /**
@@ -27,10 +26,12 @@ require_once 'includes/tripal_natural_diversity.admin.inc';
  */
 function tripal_natural_diversity_permission() {
   return array(
+    /*
     'administer tripal nd' => array(
       'title' => t('Administer Natural Diversity Module'),
       'description' => t('Allow users to administer the natural diversity module.'),
     ),
+    */
   );
 }
 
@@ -47,6 +48,7 @@ function tripal_natural_diversity_menu() {
   $items = array();
 
     // the administative settings menu
+    /*
   $items['admin/tripal/chado/tripal_natdiv'] = array(
    'title' => 'Natural Diversity Experiments',
    'description' => 'Experiments relating to natural diversity such as genotype and phenotype experiments.',
@@ -72,7 +74,7 @@ function tripal_natural_diversity_menu() {
     'access arguments' => array('administer tripal nd'),
     'type' => MENU_CALLBACK,
   );
-
+  */
   return $items;
 }
 

+ 4 - 1
legacy/tripal_phenotype/tripal_phenotype.module

@@ -22,10 +22,12 @@
  */
 function tripal_phenotype_permission() {
   return array(
+    /*
     'administer tripal phenotype' => array(
       'title' => t('Administer Phenotype Module'),
       'description' => t('Allow users to administer the phenotype module.'),
     ),
+    */
   );
 }
 
@@ -42,6 +44,7 @@ function tripal_phenotype_menu() {
   $items = array();
 
     // the administative settings menu
+    /*
   $items['admin/tripal/chado/tripal_phenotype'] = array(
    'title' => 'Phenotypes',
    'description' => 'A controlled sentence describing observable effects of non-wild type function.',
@@ -66,7 +69,7 @@ function tripal_phenotype_menu() {
     'access arguments' => array('administer tripal phenotype'),
     'type' => MENU_CALLBACK,
   );
-
+  */
   return $items;
 }
 

+ 0 - 98
legacy/tripal_project/tripal_project.install

@@ -132,102 +132,4 @@ function tripal_project_add_cvterms() {
     ),
     array('update_existing' => TRUE)
   );
-}
-
-/**
- * This is the required update for tripal_project when upgrading from Drupal core API 6.x.
- *
- */
-function tripal_project_update_7200() {
-
-  // add the project_property CV
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'project_property'")->fetchField();
-    if (!$cv_id) {
-      // add the vocabulary
-      $cv_id = db_insert('chado.cv')
-        ->fields(array(
-          'name' => 'project_property',
-          'definition' => 'Contains properties for projects.'
-        ))
-        ->execute();
-    }
-    // use the new project_property CV we just added
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-      'table_name' => 'projectprop',
-      'field_name' => 'type_id',
-      'cv_id' => $cv_id
-      ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to add project_property vocabulary: '. $error);
-  }
-
-  // add the project_relationship CV
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'project_relationship'")->fetchField();
-    if (!$cv_id) {
-      // add the vocabulary
-      $cv_id = db_insert('chado.cv')
-      ->fields(array(
-        'name' => 'project_relationship',
-        'definition' => 'Contains types of relationships between projects.'
-      ))
-      ->execute();
-    }
-    // use the new project_property CV we just added
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-        'table_name' => 'project_relationship',
-        'field_name' => 'type_id',
-        'cv_id' => $cv_id
-      ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to add project_relationship vocabulary: '. $error);
-  }
-
-  // For Tripal in Drupal 6 the project_description cvterm was stored in the
-  // 'tripal' CV.  It should be stored in the new project_property CV that
-  // is added by this module for Tripal 2.0 and Drupal 7.  So, we need to
-  // reset the CV ID for that term and rename the term to 'Project Description'
-  // We cannot use the Tripal API calls'because during upgrade the tripal_core
-  // should also be disabled
-  $sql = "
-    UPDATE chado.cvterm CVT
-    SET
-      name = 'Project Description',
-      cv_id = (SELECT cv_id FROM chado.cv WHERE name = 'project_property')
-    WHERE
-      name = 'project_description' AND
-      cv_id = (SELECT cv_id FROM chado.cv WHERE name = 'tripal')
-  ";
-  try {
-    db_query($sql);
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to change project_description property type to the project_property CV and update the name: '. $error);
-  }
-}
-
-
-/**
- * Implementation of hook_update_dependencies().  It specifies a list of
- * other modules whose updates must be run prior to this one.
- */
-function tripal_project_update_dependencies() {
-  $dependencies = array();
-
-  // the tripal_cv update 7200 must run prior to update 7200 of this module
-  $dependencies['tripal_project'][7200] = array(
-    'tripal_cv' => 7200
-  );
-
-  return $dependencies;
 }

+ 5 - 1
legacy/tripal_project/tripal_project.module

@@ -40,6 +40,8 @@ function tripal_project_views_api() {
  * @ingroup tripal_project
  */
 function tripal_project_menu() {
+  $items = array();
+  /*
   $items[ 'admin/tripal/chado/tripal_project' ]= array(
     'title' => 'Projects',
     'description' => ('A project. Can be used for grouping data such as with the natural diversity module data.'),
@@ -96,7 +98,7 @@ function tripal_project_menu() {
     'access arguments' => array('administer tripal project'),
     'type' => MENU_CALLBACK,
   );
-
+  */
   return $items;
 }
 
@@ -138,6 +140,7 @@ function tripal_project_help ($path, $arg) {
  */
 function tripal_project_permission() {
   return array(
+    /*
     'access chado_project content' => array(
       'title' => t('View Projects'),
       'description' => t('Allow users to view project pages.'),
@@ -158,6 +161,7 @@ function tripal_project_permission() {
       'title' => t('Administer Projects'),
       'description' => t('Allow users to administer all projects.'),
     ),
+    */
   );
 }
 

+ 0 - 121
legacy/tripal_stock/tripal_stock.install

@@ -204,125 +204,4 @@ function tripal_stock_add_cvs() {
  */
 function tripal_stock_add_cvterms() {
 
-}
-
-/**
- * This is the required update for tripal_stock when upgrading from Drupal core API 6.x.
- *
- */
-function tripal_stock_update_7200() {
-  // add the new CVs.  We can't use the Tripal API because during
-  // an upgrade from D6 to D7 Tripal is disable. So, we have to manually add these
-  // new vocabularies.
-
-  // add the stock_relationshp CV
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'stock_relationship'")->fetchField();
-    if (!$cv_id) {
-      // add the vocabulary
-      $cv_id = db_insert('chado.cv')
-        ->fields(array(
-          'name' => 'stock_relationship',
-          'definition' => 'Contains types of relationships between stocks.'
-        ))
-        ->execute();
-    }
-    // for backwards compatibility, get the previously set stock relationship CV, otherwise
-    // use the new stock_relationship CV we just added
-    $default_stockrel_cv = variable_get('chado_stock_relationship_cv', $cv_id);
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-        'table_name' => 'stock_relationship',
-        'field_name' => 'type_id',
-        'cv_id' => $default_stockrel_cv
-      ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to add stock_relationship vocabulary: '. $error);
-  }
-
-  // add the stock_property CV
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'stock_property'")->fetchField();
-    if (!$cv_id) {
-      // add the vocabulary
-      $cv_id = db_insert('chado.cv')
-        ->fields(array(
-          'name' => 'stock_property',
-          'definition' => 'Contains properties for stocks.'
-        ))
-        ->execute();
-    }
-    // for backwards compatibility, get the previously set stock property CV, otherwise
-    // use the new stock_property CV we just added
-    $default_stockprop_cv = variable_get('chado_stock_prop_types_cv', $cv_id);
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-      'table_name' => 'stockprop',
-      'field_name' => 'type_id',
-      'cv_id' => $default_stockprop_cv
-      ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to add stock_property vocabulary: '. $error);
-  }
-
-
-  // add the stock_type CV
-  try {
-    $cv_id = db_query("SELECT cv_id FROM chado.cv WHERE name = 'stock_type'")->fetchField();
-    if (!$cv_id) {
-      // add the vocabulary
-      $cv_id = db_insert('chado.cv')
-      ->fields(array(
-        'name' => 'stock_type',
-        'definition' => 'Contains a list of types for stocks.'
-      ))
-      ->execute();
-    }
-    // for backwards compatibility, get the previously set stock types CV, otherwise
-    // use the new stock_type CV we just added
-    $default_stocktype_cv = variable_get('chado_stock_types_cv', $cv_id);
-    db_insert('tripal_cv_defaults')
-      ->fields(array(
-      'table_name' => 'stock',
-      'field_name' => 'type_id',
-      'cv_id' => $default_stocktype_cv
-      ))
-      ->execute();
-  }
-  catch (\PDOException $e) {
-    $error = $e->getMessage();
-    throw new DrupalUpdateException('Failed to add stock_type vocabulary: '. $error);
-  }
-
-}
-
-/**
- * Add materialized views
- */
-function tripal_stock_update_7201() {
-
-  // add the materialized view
-  tripal_stock_add_organism_count_mview();
-
-}
-
-/**
- * Implementation of hook_update_dependencies().  It specifies a list of
- * other modules whose updates must be run prior to this one.
- */
-function tripal_stock_update_dependencies() {
-  $dependencies = array();
-
-  // the tripal_cv update 7200 must run prior to update 7200 of this module
-  $dependencies['tripal_stock'][7200] = array(
-    'tripal_cv' => 7200
-  );
-
-  return $dependencies;
 }

+ 6 - 3
legacy/tripal_stock/tripal_stock.module

@@ -4,7 +4,6 @@
  * Basic functionality for stocks
  */
 
-require_once 'api/tripal_stock.api.inc';
 require_once 'api/tripal_stock.DEPRECATED.inc';
 
 require_once 'theme/tripal_stock.theme.inc';
@@ -50,6 +49,7 @@ function tripal_stock_menu() {
   );
 
   //Administrative settings menu-----------------
+  /*
   $items['admin/tripal/chado/tripal_stock'] = array(
     'title' => 'Stocks',
     'description' => 'A stock is the physical entities of an organism, either living or preserved.',
@@ -100,7 +100,7 @@ function tripal_stock_menu() {
     'type' => MENU_LOCAL_TASK,
     'weight' => 10
   );
-
+  */
 
   return $items;
 }
@@ -159,6 +159,7 @@ function cs_node_load($nid) {
  */
 function tripal_stock_permission() {
   return array(
+    /*
     'access chado_stock content' => array(
       'title' => t('View Stocks'),
       'description' => t('Allow users to view stock pages.'),
@@ -179,6 +180,7 @@ function tripal_stock_permission() {
       'title' => t('Administer Stocks'),
       'description' => t('Allow users to administer all stocks.'),
     ),
+    */
   );
 }
 
@@ -205,6 +207,7 @@ function tripal_stock_permission() {
  *
  * @ingroup tripal_stock
  */
+/*
 function chado_stock_node_access($node, $op, $account) {
   if ($op == 'create') {
     if (!user_access('create chado_stock content', $account)) {
@@ -229,7 +232,7 @@ function chado_stock_node_access($node, $op, $account) {
   }
   return NULL;
 }
-
+*/
 /**
  * Implements hook_views_api().
  *