You are here

function acsf_theme_schema in Acquia Cloud Site Factory Connector 8

Same name and namespace in other branches
  1. 8.2 acsf_theme/acsf_theme.install \acsf_theme_schema()

Implements hook_schema().

File

acsf_theme/acsf_theme.install, line 11
Install-related functions.

Code

function acsf_theme_schema() {
  $schema = [];
  $schema['acsf_theme_notifications'] = [
    'description' => 'Storage for notifications about theme events on the site.',
    'fields' => [
      'id' => [
        'description' => 'An auto-incrementing ID representing an individual theme event notification.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'timestamp' => [
        'description' => 'The time this notification was sent.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'event' => [
        'description' => 'The type of theme event that occurred.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ],
      'theme' => [
        'description' => 'The system name of the theme on which the event occurred.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'attempts' => [
        'description' => 'The number of times this notification was attempted.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
    ],
    'primary key' => [
      'id',
    ],
    'indexes' => [
      'timestamp_idx' => [
        'timestamp',
      ],
    ],
  ];
  return $schema;
}