cobaltnodes.install 937 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. function cobaltnodes_install() {
  3. drupal_install_schema('cobaltnodes');
  4. }
  5. function cobaltnodes_uninstall() {
  6. drupal_uninstall_schema('cobaltnodes');
  7. }
  8. function cobaltnodes_schema() {
  9. $schema = array();
  10. $schema['cobalt_node_deletion'] = array(
  11. 'description' => t('Registers node deletions so that deleted nodes can be removed from the index.'),
  12. 'fields' => array(
  13. 'nid' => array(
  14. 'type' => 'int',
  15. 'unsigned' => TRUE,
  16. 'not null' => TRUE,
  17. 'description' => t('Node id'),
  18. ),
  19. 'deleted' => array(
  20. 'description' => t('The Unix timestamp when the node was deleted.'),
  21. 'type' => 'int',
  22. 'not null' => TRUE,
  23. 'default' => 0),
  24. ),
  25. 'primary key' => array('nid'),
  26. );
  27. return $schema;
  28. }
  29. function cobaltnodes_update_7000() {
  30. $ret = array();
  31. db_rename_table($ret, 'cobalt_nodes_deletions', 'cobalt_node_deletion');
  32. return $ret;
  33. }