function node_gallery_schema in Node Gallery 6
Same name and namespace in other branches
- 6.3 node_gallery.install \node_gallery_schema()
- 6.2 node_gallery.install \node_gallery_schema()
Implementation of hook_schema()
Return value
unknown
File
- ./
node_gallery.install, line 14 - Node gallery install file.
Code
function node_gallery_schema() {
$schema = array();
$schema['ng_gallery_config'] = array(
'fields' => array(
'name' => array(
'type' => 'varchar',
'length' => '32',
'not null' => TRUE,
'default' => '',
),
'gallery_type' => array(
'type' => 'varchar',
'length' => '32',
'not null' => TRUE,
'default' => '',
),
'image_type' => array(
'type' => 'varchar',
'length' => '32',
'not null' => TRUE,
'default' => '',
),
'data' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
),
),
'primary key' => array(
'gallery_type',
),
);
$schema['ng_images'] = array(
'fields' => array(
'gid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('Gallery node id.'),
),
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('Image node id.'),
),
'fid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('Image node file id.'),
),
'weight' => array(
'type' => 'int',
'size' => 'small',
'not null' => FALSE,
'default' => 0,
),
'is_cover' => array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'gallery_image' => array(
'gid',
'nid',
),
),
);
return $schema;
}