function fieldgroup_schema in Content Construction Kit (CCK) 6
Same name and namespace in other branches
- 6.3 modules/fieldgroup/fieldgroup.install \fieldgroup_schema()
- 6.2 modules/fieldgroup/fieldgroup.install \fieldgroup_schema()
Implementation of hook_schema.
File
- modules/
fieldgroup/ fieldgroup.install, line 50
Code
function fieldgroup_schema() {
$schema['content_group'] = array(
'fields' => array(
'type_name' => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'group_name' => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'label' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'settings' => array(
'type' => 'text',
'size' => 'medium',
'not null' => TRUE,
),
'weight' => array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'type_name',
'group_name',
),
);
$schema['content_group_fields'] = array(
'fields' => array(
'type_name' => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'group_name' => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'field_name' => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array(
'type_name',
'group_name',
'field_name',
),
);
return $schema;
}