1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?php
- function tripal_pub_install() {
- drupal_install_schema('tripal_pub');
- $dbxref = array('accession' => 'abstract', 'db_id' => array('name' => 'tripal'));
- $success = tripal_core_chado_insert('dbxref', $dbxref);
- if ($success) {
- tripal_core_chado_insert('cvterm', array('name' => 'abstract', 'cv_id' => array('name' => 'tripal'), 'db
- xref_id' => $dbxref));
- }
- }
- function tripal_pub_uninstall() {
-
- drupal_uninstall_schema('tripal_pub');
- }
- function tripal_pub_schema() {
- $schema['chado_pub'] = array(
- 'fields' => array(
-
- 'nid' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
-
- 'vid' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- ),
-
- 'pub_id' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
-
- 'pubmed_id' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => FALSE,
- ),
- 'author' => array(
- 'type' => 'text',
- 'size' => 'normal',
- 'not null' => TRUE,
- 'default' => '',
- 'description' => 'The Author Name.',
- ),
- ),
-
- 'primary key' => array('nid'),
- );
- return $schema;
- }
|