function tripal_core_mviews_schema
1.x tripal_core.install | tripal_core_mviews_schema() |
Describes the Tripal Materialized View (tripal_mviews) table This table keeps track of all materialized views created by Tripal and stored in chado
Related topics
1 call to tripal_core_mviews_schema()
- tripal_core_get_schemas in tripal_core/
tripal_core.install - This function simply defines all tables needed for the module to work correctly. By putting the table definitions in a separate function we can easily provide the entire list for hook_install or individual tables for an update.
File
- tripal_core/
tripal_core.install, line 130 - Contains functions used to install/uninstall tripal_core.
Code
function tripal_core_mviews_schema() {
$schema = array();
$schema['tripal_mviews'] = array(
'fields' => array(
'mview_id' => array('type' => 'serial', 'unsigned' => TRUE, 'not NULL' => TRUE),
'name' => array('type' => 'varchar', 'length' => 255, 'not NULL' => TRUE),
'modulename' => array('type' => 'varchar', 'length' => 50, 'not NULL' => TRUE, 'description' => 'The module name that provides the callback for this job'),
'mv_table' => array('type' => 'varchar', 'length' => 128, 'not NULL' => FALSE),
'mv_specs' => array('type' => 'text', 'size' => 'normal', 'not NULL' => FALSE),
'mv_schema' => array('type' => 'text', 'size' => 'normal', 'not NULL' => FALSE),
'indexed' => array('type' => 'text', 'size' => 'normal', 'not NULL' => FALSE),
'query' => array('type' => 'text', 'size' => 'normal', 'not NULL' => TRUE),
'special_index' => array('type' => 'text', 'size' => 'normal', 'not NULL' => FALSE),
'last_update' => array('type' => 'int', 'not NULL' => FALSE, 'description' => 'UNIX integer time'),
'status' => array('type' => 'text', 'size' => 'normal', 'not NULL' => FALSE),
'comment' => array('type' => 'text', 'size' => 'normal', 'not NULL' => FALSE),
),
'indexes' => array(
'mview_id' => array('mview_id')
),
'unique keys' => array(
'mv_table' => array('mv_table'),
'mv_name' => array('name'),
),
'primary key' => array('mview_id'),
);
return $schema;
}