You are here

function ad_schema_alter in Advertisement 7.3

Implements hook_schema_alter().

File

./ad.module, line 27
Core code for the ad module.

Code

function ad_schema_alter(&$schema) {
  if (isset($schema['eck_tracked_event'])) {
    foreach ([
      'url',
      'referrer',
      'user_agent',
      'page_title',
    ] as $field) {
      $schema['eck_tracked_event']['fields'][$field] = array(
        'description' => 'Text',
        'type' => 'text',
        'not null' => TRUE,
      );
    }
  }
}