function forena_update_7201 in Forena Reports 7.2
Same name and namespace in other branches
- 7.3 forena.install \forena_update_7201()
Updating database schema
File
- ./
forena.install, line 96 - Installation api for module
Code
function forena_update_7201() {
$schema = array();
$schema['forena_repositories'] = array(
'fields' => array(
'repository' => array(
'type' => 'varchar',
'length' => 63,
'not null' => TRUE,
),
'title' => array(
'type' => 'varchar',
'length' => 63,
),
'enabled' => array(
'type' => 'int',
'not null' => TRUE,
),
'config' => array(
'type' => 'text',
),
),
'primary_key' => array(
'repository',
),
);
$schema['forena_data_blocks'] = array(
'fields' => array(
'repository' => array(
'type' => 'varchar',
'length' => '63',
'not null' => TRUE,
),
'block_name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'title' => array(
'type' => 'varchar',
'length' => 63,
'not null' => FALSE,
),
'descriptor' => array(
'type' => 'varchar',
'length' => '255',
),
'category' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
),
'modified' => array(
'type' => 'int',
),
'src' => array(
'type' => 'text',
),
'locked' => array(
'type' => 'int',
'not null' => TRUE,
),
),
'primary key' => array(
'block_name',
),
'indexes' => array(
'category' => array(
'category',
),
'repository' => array(
'repository',
),
),
);
db_add_field('forena_reports', 'descriptor', array(
'type' => 'text',
));
db_add_field('forena_reports', 'src', array(
'type' => 'text',
));
db_add_field('forena_reports', 'altered', array(
'type' => 'int',
));
db_create_table('forena_repositories', $schema['forena_repositories']);
db_create_table('forena_data_blocks', $schema['forena_data_blocks']);
}