You are here

function _gathercontent_entity_mapping_spec in GatherContent 8.5

Entity mapping schema.

Return value

array Schema array.

3 calls to _gathercontent_entity_mapping_spec()
gathercontent_schema in ./gathercontent.install
Implements hook_schema().
gathercontent_update_8503 in ./gathercontent.install
Create tracking table.
gathercontent_update_8504 in ./gathercontent.install
Add langcode field to tracking table.

File

./gathercontent.install, line 45
Install and uninstall script for GatherContent module.

Code

function _gathercontent_entity_mapping_spec() {
  return [
    'description' => 'Stores entity id with gc_id for migrate rollback process.',
    'fields' => [
      'entity_id' => [
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Primary Key: Entity ID.',
      ],
      'entity_type' => [
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'description' => 'Entity type.',
      ],
      'gc_id' => [
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => "GatherContent import id.",
      ],
      'migration_id' => [
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => 'Migration ID.',
      ],
      'langcode' => [
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'description' => 'Language ISO2.',
      ],
    ],
    'primary key' => [
      'entity_id',
      'entity_type',
      'langcode',
    ],
    'indexes' => [
      'entity_type' => [
        'entity_type',
      ],
      'gc_id' => [
        'gc_id',
      ],
      'migration_id' => [
        'migration_id',
      ],
    ],
  ];
}