progress.install in Progress 6
Same filename and directory in other branches
Installation file for the Progress module
File
progress.installView source
<?php
/**
* @file
*
* Installation file for the Progress module
*
*/
function progress_schema() {
$schema = array();
$schema['progress'] = array(
'description' => 'Progress',
'fields' => array(
'name' => array(
'description' => 'Name of progress',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'progress' => array(
'description' => 'Progress status',
'type' => 'float',
'size' => 'big',
'not null' => TRUE,
),
'message' => array(
'description' => 'Message for current progress',
'type' => 'text',
'not null' => TRUE,
),
'start_stamp' => array(
'description' => 'Start time in unix timestamp',
'type' => 'float',
'size' => 'big',
'not null' => TRUE,
'default' => 0,
),
'end_stamp' => array(
'description' => 'End time in unix timestamp',
'type' => 'float',
'size' => 'big',
'not null' => TRUE,
'default' => 0,
),
'current_stamp' => array(
'description' => 'Current time in unix timestamp',
'type' => 'float',
'size' => 'big',
'not null' => TRUE,
),
),
'primary key' => array(
'name',
),
);
return $schema;
}
function progress_install() {
drupal_install_schema('progress');
}
function progress_uninstall() {
drupal_uninstall_schema('progress');
}
/**
* Change schema to SQL 99 compliance
*/
function progress_update_6101() {
$ret = array();
db_change_field($ret, 'progress', 'start', 'start_stamp', array(
'description' => 'Start time in unix timestamp',
'type' => 'float',
'size' => 'big',
'not null' => TRUE,
'default' => 0,
));
db_change_field($ret, 'progress', 'end', 'end_stamp', array(
'description' => 'End time in unix timestamp',
'type' => 'float',
'size' => 'big',
'not null' => TRUE,
'default' => 0,
));
db_change_field($ret, 'progress', 'current', 'current_stamp', array(
'description' => 'Current time in unix timestamp',
'type' => 'float',
'size' => 'big',
'not null' => TRUE,
'default' => 0,
));
return $ret;
}
Functions
Name | Description |
---|---|
progress_install | |
progress_schema | @file |
progress_uninstall | |
progress_update_6101 | Change schema to SQL 99 compliance |