View source
<?php
function flickr_install() {
drupal_install_schema('flickr');
}
function flickr_uninstall() {
drupal_uninstall_schema('flickr');
variable_del('flickr_api_key');
variable_del('flickr_api_secret');
variable_del('flickr_default_userid');
variable_del('flickr_cache_duration');
variable_del('flickr_class');
variable_del('flickr_rel');
variable_del('flickr_title_suppress_on_small');
variable_del('flickr_metadata_suppress_on_small');
variable_del('flickr_caption_padding');
variable_del('flickr_info_overlay');
}
function flickr_schema() {
$schema['flickr_users'] = array(
'description' => t('Connects Drupal users to their Flickr accounts.'),
'fields' => array(
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'description' => t('Primary Key: Drupal user ID'),
),
'nsid' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'description' => t('Flickr NSID'),
),
'identifier' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'description' => t('Flickr identifier'),
),
),
'primary key' => array(
'uid',
),
);
return $schema;
}
function flickr_update_1() {
flickr_install();
}