You are here

function fb_app_update_6203 in Drupal for Facebook 6.2

Same name and namespace in other branches
  1. 6.3 fb_app.install \fb_app_update_6203()

File

./fb_app.install, line 125
Installs database tables and settings required by fb_app module.

Code

function fb_app_update_6203() {
  $ret = array();
  db_drop_primary_key($ret, 'fb_app');

  // replace primary key nid with fba_id.
  db_add_field($ret, 'fb_app', 'fba_id', array(
    'type' => 'int',
    'type' => 'serial',
    'unsigned' => TRUE,
    'not null' => TRUE,
  ), array(
    'unique keys' => array(
      // This should have been a unique key all along.
      'label' => array(
        'label',
      ),
    ),
    'primary key' => array(
      'fba_id',
    ),
  ));
  return $ret;
}