/[drupal]/contributions/modules/nodevote/nodevote.install
ViewVC logotype

Diff of /contributions/modules/nodevote/nodevote.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7, Sun Jul 13 14:18:25 2008 UTC revision 1.7.2.1, Sat Oct 17 23:24:52 2009 UTC
# Line 14  function nodevote_schema() { Line 14  function nodevote_schema() {
14    $schema['nodevote'] = array(    $schema['nodevote'] = array(
15      'description' => t('Stores the users\' votes about a node'),      'description' => t('Stores the users\' votes about a node'),
16      'fields' => array(      'fields' => array(
17          'nvid' => array(
18            'description' => t('Nodevote ID'),
19            'type' => 'serial',
20            'unsigned' => TRUE,
21            'not null' => TRUE,
22          ),
23        'uid' => array(        'uid' => array(
24          'description' => t('User ID'),          'description' => t('User ID'),
25          'type' => 'int',          'type' => 'int',
# Line 40  function nodevote_schema() { Line 46  function nodevote_schema() {
46          'not null' => TRUE,          'not null' => TRUE,
47        ),        ),
48      ),      ),
49      'primary key' => array('uid', 'nid'),      'primary key' => array('nvid'),
50      'indexes' => array('node_nid' => array('nid'), 'user_id' => array('uid')),      'indexes' => array('node_nid' => array('nid'), 'user_id' => array('uid')),
51    );    );
52    return $schema;    return $schema;
# Line 58  function nodevote_update_2() { Line 64  function nodevote_update_2() {
64  }  }
65    
66  /**  /**
67     * Add new column, set it as primary key, drop old primary keys
68     */
69    function nodevote_update_6001() {
70      $ret = array();
71      db_drop_primary_key($ret, 'nodevote');
72      $field = array(
73        'description' => t('Nodevote ID'),
74        'type' => 'serial',
75        'unsigned' => TRUE,
76        'not null' => TRUE,
77      );
78      db_add_field($ret, 'nodevote', 'nvid', $field, array('primary key' => array('nvid')));
79      return $ret;
80    }
81    
82    /**
83  * Implementation of hook_uninstall().  * Implementation of hook_uninstall().
84  */  */
85  function nodevote_uninstall() {  function nodevote_uninstall() {

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.7.2.1

  ViewVC Help
Powered by ViewVC 1.1.2