You are here

function fixed_block_content_schema in Fixed Block Content 8

Implements hook_schema().

File

./fixed_block_content.install, line 13
Install, update and uninstall functions for the fixed_block_content module.

Code

function fixed_block_content_schema() {
  $schema['fixed_block_content'] = [
    'description' => 'Stores custom blocks with fixed content relations.',
    'fields' => [
      'bid' => [
        'description' => 'Block content entity ID.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ],
      'fbid' => [
        'description' => 'Fixed block entity ID.',
        'type' => 'varchar_ascii',
        'length' => ConfigEntityStorage::MAX_ID_LENGTH,
        'not null' => TRUE,
        'default' => '',
      ],
    ],
    'primary key' => [
      'bid',
      'fbid',
    ],
    'indexes' => [
      'bid' => [
        'bid',
      ],
      'fbid' => [
        'fbid',
      ],
    ],
  ];
  return $schema;
}