| 1 |
<?php |
<?php |
| 2 |
// $Id: twitter.install,v 1.2.2.6 2009/06/15 21:56:30 eaton Exp $ |
// $Id: twitter.install,v 1.2.2.7 2009/06/20 16:29:14 eaton Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_schema). |
* Implementation of hook_schema). |
| 89 |
'description' => t("The unique identifier of the {twitter_account}."), |
'description' => t("The unique identifier of the {twitter_account}."), |
| 90 |
'type' => 'numeric', |
'type' => 'numeric', |
| 91 |
'unsigned' => TRUE, |
'unsigned' => TRUE, |
| 92 |
'not null' => TRUE, |
'precision' => 20, |
| 93 |
|
'scale' => 0, 'not null' => TRUE, |
| 94 |
'default' => 0 |
'default' => 0 |
| 95 |
), |
), |
| 96 |
'screen_name' => array( |
'screen_name' => array( |
| 141 |
'last_refresh' => array( |
'last_refresh' => array( |
| 142 |
'description' => t("A UNIX timestamp marking the date Twitter statuses were last fetched on."), |
'description' => t("A UNIX timestamp marking the date Twitter statuses were last fetched on."), |
| 143 |
'type' => 'int', |
'type' => 'int', |
| 144 |
'not null' => TRUE |
'not null' => TRUE, |
| 145 |
|
'default' => 0, |
| 146 |
), |
), |
| 147 |
), |
), |
| 148 |
'indexes' => array('screen_name' => array('screen_name')), |
'indexes' => array('screen_name' => array('screen_name')), |
| 396 |
return $ret; |
return $ret; |
| 397 |
} |
} |
| 398 |
|
|
| 399 |
|
/* |
| 400 |
|
* Update the last_refresh column to supply a default value. http://drupal.org/node/301317 |
| 401 |
|
*/ |
| 402 |
|
function twitter_update_6007() { |
| 403 |
|
$ret = array(); |
| 404 |
|
db_change_field($ret, 'twitter_account', 'last_refresh', 'last_refresh', |
| 405 |
|
array( |
| 406 |
|
'description' => t("A UNIX timestamp marking the date Twitter statuses were last fetched on."), |
| 407 |
|
'type' => 'int', |
| 408 |
|
'not null' => TRUE, |
| 409 |
|
'default' => 0, |
| 410 |
|
), |
| 411 |
|
); |
| 412 |
|
return $ret; |
| 413 |
|
} |
| 414 |
|
|
| 415 |
function twitter_uninstall() { |
function twitter_uninstall() { |
| 416 |
// Remove tables. |
// Remove tables. |
| 417 |
drupal_uninstall_schema('twitter'); |
drupal_uninstall_schema('twitter'); |