| 1 |
<?php
|
| 2 |
// $Id$
|
| 3 |
/**
|
| 4 |
* @file
|
| 5 |
* Install file for distributed search
|
| 6 |
*/
|
| 7 |
|
| 8 |
function distributed_search_schema() {
|
| 9 |
$schema['distributed_search_source'] = array(
|
| 10 |
'fields' => array(
|
| 11 |
'sid' => array('type' => 'serial', 'not null' => TRUE),
|
| 12 |
'title' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''),
|
| 13 |
'url' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''),
|
| 14 |
'apikey' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''),
|
| 15 |
),
|
| 16 |
'primary key' => array('sid'),
|
| 17 |
'unique keys' => array(
|
| 18 |
'url' => array('url'),
|
| 19 |
'title' => array('title')),
|
| 20 |
);
|
| 21 |
return $schema;
|
| 22 |
}
|
| 23 |
|
| 24 |
function distributed_search_install() {
|
| 25 |
// Create tables.
|
| 26 |
drupal_install_schema('distributed_search');
|
| 27 |
}
|
| 28 |
|
| 29 |
function distributed_search_uninstall() {
|
| 30 |
// Remove tables.
|
| 31 |
drupal_uninstall_schema('distributed_search');
|
| 32 |
}
|