Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function document_search_schema()
- {
- $schema['document_search_content'] = [
- 'description' => 'Document content',
- 'fields' => [
- 'id' => array(
- 'description' => 'The primary identifier for the record',
- 'type' => 'serial',
- 'unsigned' => TRUE,
- 'not null' => TRUE
- ),
- 'mid' =>[
- 'description' => 'Primary key: {media}.mid for media',
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- 'default' => 0
- ],
- 'node_field_data_nid' =>[
- 'description' => 'Primary key: {node_field_data}.nid for node_field_data',
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE
- ],
- 'node_field_data_langcode' =>[
- 'description' => 'Primary key: {node_field_data}.langcode for node_field_data',
- 'type' => 'varchar',
- 'length' => 255,
- 'not null' => TRUE
- ],
- 'name' => [
- 'description' => 'Title of document',
- 'type' => 'text',
- 'not null' => TRUE,
- 'size' => 'normal',
- ],
- 'content' => [
- 'description' => 'Content of document',
- 'type' => 'text',
- 'not null' => TRUE,
- 'size' => 'big',
- ]
- ],
- 'foreign keys' => array(
- 'fk_node_field_data' => array(
- 'table' => 'node_field_data',
- 'columns' => array(
- 'nid' => 'nid',
- 'langcode' => 'langcode'
- ),
- ),
- 'fk_media' => array(
- 'table' => 'media',
- 'columns' => array(
- 'mid' => 'mid',
- ),
- ),
- ),
- 'primary key' => ['id'],
- ];
- return $schema;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement