You are here

public static function ShareaholicContentSettings::schema in Share Buttons, Related Posts, Content Analytics - Shareaholic 7.3

Same name and namespace in other branches
  1. 8 content_settings.php \ShareaholicContentSettings::schema()
2 calls to ShareaholicContentSettings::schema()
shareaholic_schema in ./shareaholic.install
Implements hook_schema(). Defines the shareaholic_content_settings schema
shareaholic_update_7300 in ./shareaholic.install
This update will add the new shareaholic content settings table for installs 7.x-3.3 and earlier

File

./content_settings.php, line 15

Class

ShareaholicContentSettings
An interface to the Shareaholic Content Settings database table

Code

public static function schema() {
  $schema['shareaholic_content_settings'] = array(
    'description' => 'Stores shareaholic specific settings for nodes.',
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The {node}.nid to store settings.',
      ),
      'settings' => array(
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
        'serialize' => TRUE,
        'description' => 'The settings object for a node',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
    'foreign keys' => array(
      'dnv_node' => array(
        'table' => 'node',
        'columns' => array(
          'nid' => 'nid',
        ),
      ),
    ),
  );
  return $schema;
}