entity_update.install in Entity Update 8
Same filename and directory in other branches
Entity update module (entity_update).
This file provide install/uninstall/update tasks.
File
entity_update.installView source
<?php
/**
* @file
* Entity update module (entity_update).
*
* This file provide install/uninstall/update tasks.
*/
/**
* Implements hook_schema().
*/
function entity_update_schema() {
$schema['entity_update'] = [
'description' => 'Entity data backup table',
'fields' => [
'id' => [
'type' => 'serial',
'not null' => TRUE,
],
'entity_type' => [
'type' => 'varchar',
'length' => '64',
'not null' => TRUE,
],
'entity_id' => [
'type' => 'varchar',
'length' => '64',
'not null' => TRUE,
],
'entity_class' => [
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
],
'status' => [
'type' => 'int',
'size' => 'small',
'default' => 0,
],
'data' => [
'type' => 'blob',
'size' => 'big',
],
],
'primary key' => [
'id',
],
'unique keys' => [
'entity' => [
'entity_type',
'entity_id',
],
],
];
return $schema;
}
Functions
Name | Description |
---|---|
entity_update_schema | Implements hook_schema(). |