You are here

function votingapi_update_2 in Voting API 6.2

Same name and namespace in other branches
  1. 5 votingapi.install \votingapi_update_2()
  2. 6 votingapi.install \votingapi_update_2()

Value fields changed to signed floats.

File

./votingapi.install, line 70
Installation file for VotingAPI module.

Code

function votingapi_update_2() {
  $ret = array();
  db_drop_primary_key($ret, 'votingapi_cache');
  db_drop_primary_key($ret, 'votingapi_vote');
  db_change_field($ret, votingapi_cache, value, value, array(
    'type' => 'float',
    'default' => NULL,
  ), array(
    'primary_key' => array(
      'vote_cache_id',
    ),
  ));
  db_change_field($ret, votingapi_vote, value, value, array(
    'type' => 'float',
    'default' => NULL,
  ), array(
    'primary_key' => array(
      'vote_id',
    ),
  ));
  return $ret;
}