function facebook_tracking_pixel_schema in Facebook Tracking Pixel 8
Same name and namespace in other branches
- 7 facebook_tracking_pixel.install \facebook_tracking_pixel_schema()
Implements hook_schema().
File
- ./
facebook_tracking_pixel.install, line 14 - Install, update, and uninstall functions for the Facebook Tracking Pixel module.
Code
function facebook_tracking_pixel_schema() {
$schema['facebook_tracking_pixel_events_path'] = [
'description' => t('Facebook Tracking Pixel Events'),
'fields' => [
'event_id' => [
'description' => 'The event id.',
'type' => 'serial',
'not null' => TRUE,
],
'event_uid' => [
'type' => 'varchar',
'length' => 200,
'description' => 'Unique ID number for the tracking item',
'disp-width' => '25',
],
'event_name' => [
'type' => 'varchar',
'length' => 200,
'description' => 'Human readable name for the item',
'disp-width' => '10',
],
'event_path' => [
'description' => 'The event path.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => FALSE,
],
'event_path_system' => [
'description' => 'The resolved system path.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => FALSE,
],
'event_type' => [
'description' => 'The event type as a serialized array of types.',
'type' => 'varchar',
'length' => 1000,
'default' => '',
'not null' => FALSE,
],
'event_js_file' => [
'description' => 'The file path to the written JS file.',
'type' => 'varchar',
'length' => 255,
'default' => '',
'not null' => FALSE,
],
'event_base_code_id' => [
'description' => 'Base code ID number.',
'type' => 'int',
'length' => 11,
'not null' > FALSE,
],
'event_enable' => [
'description' => 'If a code is enabled.',
'type' => 'int',
'length' => 2,
'default' => 1,
'not null' > FALSE,
],
'weight' => [
'description' => 'The sortable weight for this item',
'type' => 'int',
'length' => 11,
'not null' => TRUE,
'default' => 0,
],
],
'primary key' => [
'event_id',
],
];
$schema['facebook_tracking_pixel_base_codes'] = [
'description' => t('Facebook Tracking Pixel Events'),
'fields' => [
'base_code_id' => [
'description' => 'Base Code ID.',
'type' => 'serial',
'not null' => TRUE,
],
'base_code_name' => [
'description' => 'Base Code Name.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'default' => '',
],
'base_code_fbid' => [
'description' => 'Base Code ID.',
'type' => 'varchar',
'length' => 200,
'not null' => TRUE,
],
'base_code_global' => [
'description' => 'If a code is used globally.',
'type' => 'int',
'length' => 2,
'not null' > FALSE,
],
'weight' => [
'description' => 'The sortable weight for this item.',
'type' => 'int',
'length' => 11,
'not null' => TRUE,
'default' => 0,
],
],
'primary key' => [
'base_code_id',
],
];
return $schema;
}