| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 | 
							- <?php
 
- /**
 
-  * @file
 
-  * This file contains all the functions which describe and implement drupal database tables
 
-  * needed by this module. This module was developed by Chad N.A. Krilow and Lacey-Anne Sanderson,
 
-  * University of Saskatchewan.
 
-  *
 
-  * The project manamgenet module allows you to sync data in a chado/Tripal instance with
 
-  * multiple project/mysql instances as well as manage and create such project instances
 
-  */
 
- /**
 
-  * Implementation of hook_requirements().
 
-  *
 
-  */
 
- function tripal_project_requirements($phase) {
 
-   $requirements = array();
 
-   if ($phase == 'install') {
 
-     // make sure chado is installed
 
-     if (!tripal_core_is_chado_installed()) {
 
-       $requirements ['tripal_project'] = array(
 
-         'title' => "tripal_project",
 
-         'value' => "ERROR: Chado most be installed before this module can be enabled",
 
-         'severity' => REQUIREMENT_ERROR,
 
-       );
 
-     }
 
-   }
 
-   return $requirements;
 
- }
 
- /**
 
-  * Implementation of hook_install().
 
-  */
 
- function tripal_project_install() {
 
-   
 
-   // create the module's data directory
 
-   tripal_create_moddir('tripal_project');
 
-   
 
-   tripal_project_add_cvterms();
 
- }
 
- /**
 
-  * Implementation of hook_uninstall().
 
-  */
 
- function tripal_project_uninstall() {
 
- }
 
- /**
 
-  * Implementation of hook_schema().
 
-  */
 
- function tripal_project_schema() {
 
-   $schema['chado_project'] = array(
 
-     'fields' => array(
 
-       'nid' => array(
 
-         'type' => 'int',
 
-         'unsigned' => TRUE,
 
-         'not null' => TRUE,
 
-       ),
 
-       'vid' => array(
 
-           'type' => 'int',
 
-           'not null' => TRUE,
 
-       ),
 
-       'project_id' => array(
 
-         'type' => 'int',
 
-         'unsigned' => TRUE,
 
-         'not null' => TRUE,
 
-       ),
 
-     ),
 
-     'primary key' => array('nid', 'vid', 'project_id'),
 
-   );
 
-   return $schema;
 
- }
 
- /*
 
-  * 
 
-  */
 
- function tripal_project_add_cvterms() {
 
-   
 
-   // Insert cvterm 'library_description' into cvterm table of chado
 
-   // database. This CV term is used to keep track of the library
 
-   // description in the libraryprop table.
 
-   tripal_cv_add_cvterm(array('name' => 'project_description', 'def' => 'Description of a project'), 
 
-     'tripal', 0, 1, 'tripal'); 
 
- }
 
 
  |