You are here

function acquia_contenthub_subscriber_schema in Acquia Content Hub 8.2

Implements hook_schema().

File

modules/acquia_contenthub_subscriber/acquia_contenthub_subscriber.install, line 11
Acquia Content Hub - Subscriber module install file.

Code

function acquia_contenthub_subscriber_schema() {
  $schema = [];
  $schema['acquia_contenthub_subscriber_import_tracking'] = [
    'description' => 'Table for tracking which entities have been imported from contenthub.',
    'fields' => [
      'entity_uuid' => [
        'type' => 'char',
        'length' => 36,
        'not null' => TRUE,
        'default' => '',
      ],
      'entity_type' => [
        'type' => 'varchar',
        'length' => 32,
        'default' => '',
      ],
      'entity_id' => [
        'type' => 'varchar_ascii',
        'length' => 255,
        'default' => '',
      ],
      'status' => [
        'description' => 'The status of an imported entity.',
        'type' => 'varchar',
        'default' => '',
        'not null' => TRUE,
        'length' => 36,
      ],
      'first_imported' => [
        'description' => 'The first imported date.',
        'type' => 'varchar',
        'default' => '',
        'not null' => TRUE,
        'length' => 36,
      ],
      'last_imported' => [
        'description' => 'The last imported date.',
        'type' => 'varchar',
        'default' => '',
        'not null' => TRUE,
        'length' => 36,
      ],
      'hash' => [
        'type' => 'char',
        'length' => 40,
        'default' => '',
      ],
      'queue_id' => [
        'type' => 'varchar',
        'description' => "Queue item to track queue record",
        'length' => 32,
        'not null' => FALSE,
      ],
    ],
    'unique keys' => [
      'entity_uuid' => [
        'entity_uuid',
      ],
    ],
  ];
  return $schema;
}