You are here

function sexybookmarks_update_6200 in Share Buttons, Related Posts, Content Analytics - Shareaholic 7

Same name and namespace in other branches
  1. 7.2 sexybookmarks.install \sexybookmarks_update_6200()

Add 'sexybookmarks_profiles' database table.

File

./sexybookmarks.install, line 64
Install, update and uninstall functions for the SexyBookmarks module.

Code

function sexybookmarks_update_6200(&$sandbox) {
  if (!db_table_exists('sexybookmarks_profiles')) {
    db_create_table('sexybookmarks_profiles', array(
      'fields' => array(
        'name' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => TRUE,
          'default' => '',
          'description' => '',
        ),
        'config' => array(
          'type' => 'text',
          'size' => 'medium',
          'not null' => TRUE,
          'serialize' => TRUE,
          'description' => '',
        ),
      ),
      'unique keys' => array(
        'name' => array(
          'name',
        ),
      ),
      'primary key' => array(
        'name',
      ),
    ));
    variable_del('sexybookmarks');
    return t('Added SexyBookmarks profile table.');
  }
}