You are here

function acquia_contenthub_publisher_schema in Acquia Content Hub 8.2

Implements hook_schema().

File

modules/acquia_contenthub_publisher/acquia_contenthub_publisher.install, line 11
Acquia Content Hub - Publisher module install file.

Code

function acquia_contenthub_publisher_schema() {
  $schema = [];
  $schema['acquia_contenthub_publisher_export_tracking'] = [
    'description' => 'Table for tracking which entities have been exported to contenthub.',
    'fields' => [
      'entity_type' => [
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ],
      'entity_id' => [
        'type' => 'varchar_ascii',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'entity_uuid' => [
        'type' => 'char',
        'length' => 36,
        'not null' => TRUE,
        'default' => '',
      ],
      'status' => [
        'description' => 'The status of an exported entity.',
        'type' => 'varchar',
        'default' => '',
        'not null' => TRUE,
        'length' => 36,
      ],
      'created' => [
        'description' => "The CDF entity's created value.",
        'type' => 'varchar',
        'default' => '',
        'not null' => TRUE,
        'length' => 36,
      ],
      'modified' => [
        'description' => "The CDF entity's modified value.",
        'type' => 'varchar',
        'default' => '',
        'not null' => TRUE,
        'length' => 36,
      ],
      'hash' => [
        'type' => 'char',
        'length' => 40,
        'default' => '',
      ],
      'queue_id' => [
        'description' => "Queue item to track queue record",
        'type' => 'varchar',
        'length' => 32,
        'not null' => FALSE,
      ],
    ],
    'unique keys' => [
      'entity' => [
        'entity_type',
        'entity_id',
      ],
      'entity_uuid' => [
        'entity_uuid',
      ],
    ],
  ];
  return $schema;
}