You are here

function kwresearch_google_schema in Keyword Research 7

Same name and namespace in other branches
  1. 6 modules/kwresearch_google/kwresearch_google.install \kwresearch_google_schema()

Implements hook_schema ().

File

modules/kwresearch_google/kwresearch_google.install, line 14
Install hooks for Keyword Research Google.

Code

function kwresearch_google_schema() {
  $schema['kwresearch_google_data'] = array(
    'description' => 'Creates database table to store google keyword data.',
    'fields' => array(
      'keyphrase' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => TRUE,
        'default' => '',
        'description' => 'target keyphrase.',
      ),
      //keyphrase
      'updated' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
        'description' => 'timestamp of last data update',
      ),
      //updated
      'monthly_searches' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'monthly search volume.',
      ),
      //score
      'competition' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'competivness of the keyword.',
      ),
      //competition
      'avg_cpc' => array(
        'type' => 'float',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'competivness of the keyword.',
      ),
      //competition
      'global_monthly_searches' => array(
        'type' => 'int',
        'not null' => FALSE,
        'description' => 'global monthly search volume from Google AdWords tool.',
      ),
      //global_monthly_searches
      'local_monthly_searches' => array(
        'type' => 'int',
        'not null' => FALSE,
        'description' => 'local monthly search volume from Google AdWords tool.',
      ),
      //local_monthly_searches
      'sktool_monthly_searches' => array(
        'type' => 'int',
        'not null' => FALSE,
        'description' => 'local monthly search volume from Google Search Keyword tool.',
      ),
    ),
    'primary key' => array(
      'keyphrase',
    ),
  );
  return $schema;
}