60 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
<?php
 | 
						|
// $Id$
 | 
						|
 | 
						|
/**
 | 
						|
 * @file
 | 
						|
 * Install, update and uninstall functions for the taxonomy_test module.
 | 
						|
 */
 | 
						|
 | 
						|
/**
 | 
						|
 * Implement hook_schema().
 | 
						|
 */
 | 
						|
function taxonomy_test_schema() {
 | 
						|
  $schema['term_antonym'] = array(
 | 
						|
    'description' => 'Stores term antonyms.',
 | 
						|
    'fields' => array(
 | 
						|
      'taid' => array(
 | 
						|
        'type' => 'serial',
 | 
						|
        'not null' => TRUE,
 | 
						|
        'description' => 'Primary Key: Unique term antonym ID.',
 | 
						|
      ),
 | 
						|
      'tid' => array(
 | 
						|
        'type' => 'int',
 | 
						|
        'unsigned' => TRUE,
 | 
						|
        'not null' => TRUE,
 | 
						|
        'default' => 0,
 | 
						|
        'description' => 'The {taxonomy_term_data}.tid of the term.',
 | 
						|
      ),
 | 
						|
      'name' => array(
 | 
						|
        'type' => 'varchar',
 | 
						|
        'length' => 255,
 | 
						|
        'not null' => TRUE,
 | 
						|
        'default' => '',
 | 
						|
        'description' => 'The name of the antonym.',
 | 
						|
      ),
 | 
						|
    ),
 | 
						|
    'indexes' => array(
 | 
						|
      'tid' => array('tid'),
 | 
						|
      'name_tid' => array('name', 'tid'),
 | 
						|
    ),
 | 
						|
    'primary key' => array('taid'),
 | 
						|
  );
 | 
						|
 | 
						|
  return $schema;
 | 
						|
}
 | 
						|
 | 
						|
/**
 | 
						|
 * Implement hook_install().
 | 
						|
 */
 | 
						|
function taxonomy_test_install() {
 | 
						|
  drupal_install_schema('taxonomy_test');
 | 
						|
}
 | 
						|
 | 
						|
/**
 | 
						|
 * Implement hook_uninstall().
 | 
						|
 */
 | 
						|
function taxonomy_test_uninstall() {
 | 
						|
  drupal_uninstall_schema('taxonomy_test');
 | 
						|
}
 | 
						|
 |