activityhistory.install in Activity 6
File
contrib/activityhistory/activityhistory.install
View source
<?php
function activityhistory_schema() {
$schema['activity_history'] = array(
'description' => 'The {activity_history} table stores activity history data',
'fields' => array(
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'aid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'timestamp' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'uid',
'aid',
),
);
return $schema;
}
function activityhistory_install() {
drupal_install_schema('activityhistory');
}
function activityhistory_uninstall() {
drupal_uninstall_schema('activityhistory');
}
function activityhistory_update_6101() {
$ret = array();
db_drop_primary_key($ret, 'activity_history');
db_add_primary_key($ret, 'activity_history', array(
'uid',
'aid',
));
return $ret;
}