function workspaces_schema
Same name in other branches
- 9 core/modules/workspaces/workspaces.install \workspaces_schema()
- 8.9.x core/modules/workspaces/workspaces.install \workspaces_schema()
- 10 core/modules/workspaces/workspaces.install \workspaces_schema()
Implements hook_schema().
File
-
core/
modules/ workspaces/ workspaces.install, line 83
Code
function workspaces_schema() {
$schema['workspace_association'] = [
'description' => 'Stores the association between entity revisions and their workspace.',
'fields' => [
'workspace' => [
'type' => 'varchar_ascii',
'length' => 128,
'not null' => TRUE,
'default' => '',
'description' => 'The workspace ID.',
],
'target_entity_type_id' => [
'type' => 'varchar_ascii',
'length' => EntityTypeInterface::ID_MAX_LENGTH,
'not null' => TRUE,
'default' => '',
'description' => 'The ID of the associated entity type.',
],
'target_entity_id' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'The ID of the associated entity.',
],
'target_entity_revision_id' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'The revision ID of the associated entity.',
],
],
'indexes' => [
'target_entity_revision_id' => [
'target_entity_revision_id',
],
],
'primary key' => [
'workspace',
'target_entity_type_id',
'target_entity_id',
],
];
return $schema;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.