2015-04-19 16:46:59 +02:00

41 lines
937 B
Plaintext

<?php
function cobaltnodes_install() {
drupal_install_schema('cobaltnodes');
}
function cobaltnodes_uninstall() {
drupal_uninstall_schema('cobaltnodes');
}
function cobaltnodes_schema() {
$schema = array();
$schema['cobalt_node_deletion'] = array(
'description' => t('Registers node deletions so that deleted nodes can be removed from the index.'),
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => t('Node id'),
),
'deleted' => array(
'description' => t('The Unix timestamp when the node was deleted.'),
'type' => 'int',
'not null' => TRUE,
'default' => 0),
),
'primary key' => array('nid'),
);
return $schema;
}
function cobaltnodes_update_7000() {
$ret = array();
db_rename_table($ret, 'cobalt_nodes_deletions', 'cobalt_node_deletion');
return $ret;
}