function comment_alter_schema in Comment Alter 8
Same name and namespace in other branches
- 7 comment_alter.install \comment_alter_schema()
Implements hook_schema().
File
- ./
comment_alter.install, line 13 - Install and uninstall functions for the Comment Alter module.
Code
function comment_alter_schema() {
$schema['comment_alter'] = [
'description' => 'Stores the old and new entity revision ID as altered by comment.',
'fields' => [
'cid' => [
'description' => 'The {comment}.cid this change refers to.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
'parent_entity_type' => [
'description' => 'Entity type of the parent entity.',
'type' => 'varchar_ascii',
'length' => EntityTypeInterface::ID_MAX_LENGTH,
'not null' => TRUE,
'default' => 'node',
],
'old_vid' => [
'description' => 'The old entity revision ID this change refers to.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
'new_vid' => [
'description' => 'The new entity revision ID this change refers to.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
],
'indexes' => [
'parent_entity_type' => [
'parent_entity_type',
],
'new_vid' => [
'new_vid',
],
'old_vid' => [
'old_vid',
],
],
'primary key' => [
'cid',
],
];
return $schema;
}