| 1 |
<?php |
<?php |
| 2 |
// $Id: api.install,v 1.11.2.7 2009/08/30 00:48:39 drumm Exp $ |
// $Id: api.install,v 1.11.2.8 2009/08/30 01:11:36 drumm Exp $ |
| 3 |
|
|
| 4 |
function api_schema() { |
function api_schema() { |
| 5 |
$schema['api_branch'] = array( |
$schema['api_branch'] = array( |
| 26 |
'summary' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE), |
'summary' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE), |
| 27 |
'documentation' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE), |
'documentation' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE), |
| 28 |
'code' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE), |
'code' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE), |
| 29 |
|
'start_line' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), |
| 30 |
), |
), |
| 31 |
'primary key' => array('did'), |
'primary key' => array('did'), |
| 32 |
'unique keys' => array( |
'unique keys' => array( |
| 50 |
'fields' => array( |
'fields' => array( |
| 51 |
'did' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), |
'did' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), |
| 52 |
'signature' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''), |
'signature' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''), |
|
'start_line' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), |
|
| 53 |
'parameters' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE), |
'parameters' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE), |
| 54 |
'return_value' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE), |
'return_value' => array('type' => 'text', 'size' => 'medium', 'not null' => TRUE), |
| 55 |
), |
), |
| 337 |
return array(); |
return array(); |
| 338 |
} |
} |
| 339 |
|
|
| 340 |
|
/** |
| 341 |
|
* Move start line next to code. |
| 342 |
|
*/ |
| 343 |
|
function api_update_19() { |
| 344 |
|
$return = array(); |
| 345 |
|
|
| 346 |
|
db_drop_field($return, 'api_function', 'start_line'); |
| 347 |
|
db_add_field($return, 'api_documentation', 'start_line', array('type' => 'int', 'not null' => TRUE, 'default' => 0)); |
| 348 |
|
|
| 349 |
|
return $return; |
| 350 |
|
} |
| 351 |
|
|
| 352 |
function api_uninstall() { |
function api_uninstall() { |
| 353 |
drupal_uninstall_schema('api'); |
drupal_uninstall_schema('api'); |
| 354 |
variable_del('api_default_branch'); |
variable_del('api_default_branch'); |