Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

95 lines (93 sloc) 2.637 kB
<?php
/**
* Implementation of hook_schema
*/
function bean_schema() {
$schema['bean'] = array(
'description' => 'Stores bean items.',
'fields' => array(
'bid' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key: Unique bean item ID.',
),
'label' => array(
'description' => 'The Displays in the Admin page.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => 'The human-readable name of this bean.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'type' => array(
'description' => 'The {bean_type}.type of this bean.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'data' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
'description' => 'A serialized array of additional data related to this bean.',
),
),
'foreign keys' => array(
'type' => array(
'table' => 'bean_type',
'columns' => array('type' => 'type'),
),
),
'primary key' => array('bid'),
);
$schema['bean_type'] = array(
'description' => 'Stores information about all defined bean types.',
'fields' => array(
'id' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => 'Primary Key: Unique bean type ID.',
),
'type' => array(
'description' => 'The machine-readable name of this bean type.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'label' => array(
'description' => 'The human-readable name of this bean type.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'weight' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => 'The weight of this bean type in relation to others.',
),
'data' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
'description' => 'A serialized array of additional data related to this bean type.',
),
) + entity_exportable_schema_fields(),
'primary key' => array('id'),
'unique keys' => array(
'type' => array('type'),
),
);
return $schema;
}
Jump to Line
Something went wrong with that request. Please try again.