You are here

function reviews_update_7002 in Reviews 7

Add the ratings field to the reviews table

File

./reviews.install, line 119
Defines database schema for reviews and installs/uninstalls all necessary settings.

Code

function reviews_update_7002() {
  if (!db_field_exists('reviews', 'rating')) {
    $schema = drupal_get_schema('reviews');
    db_add_field('reviews', 'rating', $schema['fields']['rating']);
  }
  return "Added the 'rating' field to the 'reviews' table for the Reviews module.";
}