You are here

function simplifying_schema in Simplifying 8

Implements hook_schema().

1 call to simplifying_schema()
simplifying_update_8001 in ./simplifying.install
Create table "simplifying_entity_unread"

File

./simplifying.install, line 8

Code

function simplifying_schema() {
  $schema['simplifying_entity_unread'] = [
    'description' => 'new unread entitis.',
    'fields' => [
      'id' => [
        'description' => 'The primary identifier.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'entity_type' => [
        'description' => 'Entity type',
        'type' => 'varchar',
        'length' => 100,
        'not null' => FALSE,
      ],
      'bundle' => [
        'description' => 'Bundle',
        'type' => 'varchar',
        'length' => 100,
        'not null' => FALSE,
      ],
      'entity_id' => [
        'description' => 'Entity ID',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
        'default' => 0,
      ],
    ],
    'indexes' => [
      'id' => [
        'id',
      ],
      'entity_type' => [
        'entity_type',
      ],
      'bundle' => [
        'bundle',
      ],
      'entity_id' => [
        'entity_id',
      ],
    ],
    'primary key' => [
      'id',
    ],
  ];
  return $schema;
}