You are here

function draggableviews_update_6301 in DraggableViews 7

Same name and namespace in other branches
  1. 6.3 draggableviews.install \draggableviews_update_6301()

Add a schema for structure information

File

./draggableviews.install, line 121
Draggableviews defines a new database schema for saving the collapsed/expand state of views.

Code

function draggableviews_update_6301() {
  $ret = array();
  db_drop_primary_key('draggableviews_collapsed');
  db_add_field('draggableviews_collapsed', 'vid', array(
    'type' => 'int',
    'not null' => TRUE,
    'unsigned' => TRUE,
  ));
  db_add_primary_key('draggableviews_collapsed', array(
    'uid',
    'vid',
    'parent_nid',
  ));

  // hook_update_N() no longer returns a $ret array. Instead, return
  // nothing or a translated string indicating the update ran successfully.
  // See http://drupal.org/node/224333#update_sql.
  return t('TODO Add a descriptive string here to show in the UI.');
}