You are here

function google_adwords_remarketing_schema in Google Adwords Remarketing 7

Same name and namespace in other branches
  1. 6 google_adwords_remarketing.install \google_adwords_remarketing_schema()

Implements hook_schema().

File

./google_adwords_remarketing.install, line 10
Installation file for Google Adwords Remarketing module.

Code

function google_adwords_remarketing_schema() {
  $schema['google_adwords_remarketing'] = array(
    'description' => t('Stores (GARC) Google AdWords Remarketing Campaigns'),
    'primary key' => array(
      'garcid',
    ),
    'fields' => array(
      'garcid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => t('Primary Key: Unique GARC ID.'),
      ),
      'info' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
        'description' => 'GARC Administrative description.',
      ),
      'status' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
        'description' => 'GARC Enabled status. (1 = enabled, 0 = disabled)',
      ),
      'theme' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The theme under which the GARC settings apply.',
      ),
      'weight' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
        'description' => 'GARC weight.',
      ),
      'visibility' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
        'description' => 'Flag to indicate how to show GARC on pages. (0 = Show on all pages except listed pages, 1 = Show only on listed pages, 2 = Use custom PHP code to determine visibility)',
      ),
      'pages' => array(
        'type' => 'text',
        'not null' => TRUE,
        'description' => 'Contents of the "Pages" GARC; contains either a list of paths on which to include/exclude the GARC or PHP code, depending on "visibility" setting.',
      ),
      'conversion_id' => array(
        'type' => 'varchar',
        'default' => '',
        'length' => 15,
        'not null' => TRUE,
        'description' => 'GARC Conversion ID.',
      ),
      'language' => array(
        'type' => 'varchar',
        'default' => 'en_US',
        'length' => 15,
        'description' => 'GARC Conversion Language.',
      ),
      'format' => array(
        'type' => 'varchar',
        'default' => '3',
        'length' => 10,
        'not null' => TRUE,
        'description' => 'GARC Conversion Format.',
      ),
      'color' => array(
        'type' => 'varchar',
        'default' => '',
        'length' => 10,
        'description' => 'GARC Conversion Color.',
      ),
      'label' => array(
        'type' => 'varchar',
        'default' => '',
        'length' => 255,
        'description' => 'GARC Conversion Label.',
      ),
      'params' => array(
        'type' => 'varchar',
        'default' => '',
        'length' => 255,
        'description' => 'GARC Params.',
      ),
      'remarketing' => array(
        'type' => 'varchar',
        'default' => '',
        'length' => 10,
        'description' => 'remarketing_only.',
      ),
      'ext_js' => array(
        'type' => 'varchar',
        'default' => 'http://www.googleadservices.com/pagead/conversion.js',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'garcid',
    ),
  );
  $schema['google_adwords_remarketing_roles'] = array(
    'description' => 'Sets up access permissions for google adwords remarketing Campaigns based on user roles',
    'fields' => array(
      'garcid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'rid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => "The user's role ID from {users_roles}.rid.",
      ),
    ),
    'indexes' => array(
      'garcid' => array(
        'garcid',
      ),
      'rid' => array(
        'rid',
      ),
    ),
  );
  return $schema;
}