function draggableviews_schema in DraggableViews 6.3
Same name and namespace in other branches
- 8 draggableviews.install \draggableviews_schema()
- 6 draggableviews.install \draggableviews_schema()
- 6.2 draggableviews.install \draggableviews_schema()
- 7.2 draggableviews.install \draggableviews_schema()
- 7 draggableviews.install \draggableviews_schema()
- 2.0.x draggableviews.install \draggableviews_schema()
Implements of hook_schema().
1 call to draggableviews_schema()
- draggableviews_update_6300 in ./
draggableviews.install - Add a schema for structure information
File
- ./
draggableviews.install, line 12 - Draggableviews defines a new database schema for saving the collapsed/expand state of views.
Code
function draggableviews_schema() {
$schema['draggableviews_collapsed'] = array(
'description' => t('The table that knows whether sub-lists are collapsed or expanded.'),
'fields' => array(
'uid' => array(
'description' => t('The user.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'parent_nid' => array(
'description' => t('The parent node.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'view_name' => array(
'description' => t('The view id.'),
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'collapsed' => array(
'description' => t('The state.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'uid',
'parent_nid',
'view_name',
),
);
$schema['draggableviews_structure'] = array(
'description' => t('The table saves the order settings of an draggableview.'),
'fields' => array(
'view_name' => array(
'description' => t('Makes the order unique for each view.'),
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'nid' => array(
'description' => t('The node id.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'delta' => array(
'description' => t('Makes the order unique for each level.'),
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'args' => array(
'description' => t('Makes the order unique for a given set of arguments'),
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'value' => array(
'description' => t('The value.'),
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'nid',
'view_name',
'delta',
'args',
),
);
return $schema;
}