You are here

function photos_update_7303 in Album Photos 7.3

Add {photos_node}.wid to help sort images in sub-albums by weight.

File

./photos.install, line 528
Install, update, and uninstall functions for the Album Photos module.

Code

function photos_update_7303() {
  if (!db_field_exists('photos_node', 'wid')) {

    // Add album wid.
    $spec = array(
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
    );
    db_add_field('photos_node', 'wid', $spec);
    db_add_index('photos_node', 'wid', array(
      'wid',
    ));
    return t('Successfully added weight field!');
  }
}