You are here

public static function SystemSetQueue::getSchema in Queue Unique 7

Same name and namespace in other branches
  1. 7.2 src/Queue/SystemSetQueue.php \Drupal\queue_unique\Queue\SystemSetQueue::getSchema()

Gets the schema as expected by Schema API.

Return value

array A DB schema

1 call to SystemSetQueue::getSchema()
queue_unique_schema in ./queue_unique.install
Implements hook_schema().

File

src/Queue/SystemSetQueue.php, line 138
Contains \Drupal\queue_unique\Queue\SystemSetQueue

Class

SystemSetQueue

Namespace

Drupal\queue_unique\Queue

Code

public static function getSchema() {
  module_load_include('install', 'system', 'system');
  $system_schema = system_schema();
  $schema = array(
    static::TABLE_NAME => $system_schema['queue'],
  );
  $schema[static::TABLE_NAME]['fields']['md5'] = array(
    'type' => 'char',
    'length' => 32,
    'not null' => TRUE,
  );
  $schema[static::TABLE_NAME]['unique keys'] = array(
    'md5' => array(
      'md5',
    ),
  );
  return $schema;
}