function sbp_attach_schema in Search by Page 7
Same name and namespace in other branches
- 6 sbp_attach.install \sbp_attach_schema()
Implements hook_schema().
File
- ./
sbp_attach.install, line 11 - Install hooks for sbp_attach module
Code
function sbp_attach_schema() {
$schema['sbpa_attachments'] = array(
'description' => 'Attachments that have been indexed',
'fields' => array(
'sbpaid' => array(
'description' => 'Primary key',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'environment' => array(
'description' => 'Search by Page environment ID',
'type' => 'int',
'size' => 'big',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'objtype' => array(
'description' => '{field_config_instance}.object_type - type of object field is attached to',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'objid' => array(
'description' => 'Entity object ID, usually node.nid, of object field is attached to',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'bundle' => array(
'description' => '{field_config_instance}.bundle - bundle field is attached to',
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
),
'fieldname' => array(
'description' => '{field_config}.field_name - field name',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'fileid' => array(
'description' => '{files}.fid - file ID',
'type' => 'int',
'not null' => FALSE,
'unsigned' => TRUE,
),
'display' => array(
'description' => '1 if this file is marked displayed, 0 if not',
'type' => 'int',
'size' => 'tiny',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 1,
),
),
'primary key' => array(
'sbpaid',
),
'indexes' => array(
'env' => array(
'environment',
),
'objid' => array(
'objid',
),
'objtype' => array(
'objtype',
),
'display' => array(
'display',
),
),
);
return $schema;
}