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