| 1 |
<?php |
<?php |
| 2 |
// $Id: workflow.install,v 1.12 2008/12/29 20:17:51 jvandyk Exp $ |
// $Id: workflow.install,v 1.13 2008/12/31 21:25:05 jvandyk Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_install(). |
* Implementation of hook_install(). |
| 29 |
'wid' => array('type' => 'serial', 'not null' => TRUE), |
'wid' => array('type' => 'serial', 'not null' => TRUE), |
| 30 |
'name' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''), |
'name' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''), |
| 31 |
'tab_roles' => array('type' => 'varchar', 'length' => '60', 'not null' => TRUE, 'default' => ''), |
'tab_roles' => array('type' => 'varchar', 'length' => '60', 'not null' => TRUE, 'default' => ''), |
| 32 |
'options' => array('type' => 'text', 'size' => 'big', 'not null' => FALSE, 'default' => '')), |
'options' => array('type' => 'text', 'size' => 'big', 'not null' => FALSE)), |
| 33 |
'primary key' => array('wid'), |
'primary key' => array('wid'), |
| 34 |
); |
); |
| 35 |
$schema['workflow_type_map'] = array( |
$schema['workflow_type_map'] = array( |
| 75 |
); |
); |
| 76 |
$schema['workflow_node_history'] = array( |
$schema['workflow_node_history'] = array( |
| 77 |
'fields' => array( |
'fields' => array( |
| 78 |
'hid' => array('type' => 'serial'), |
'hid' => array('type' => 'serial', 'not null' => TRUE), |
| 79 |
'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'), |
'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'), |
| 80 |
'old_sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'), |
'old_sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'), |
| 81 |
'sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'), |
'sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'), |
| 384 |
// Add a general data field for storing workflow options. |
// Add a general data field for storing workflow options. |
| 385 |
function workflow_update_6100() { |
function workflow_update_6100() { |
| 386 |
$ret = array(); |
$ret = array(); |
| 387 |
db_add_field($ret, 'workflows', 'options', array('type' => 'text', 'size' => 'big', 'not null' => FALSE, 'default' => '')); |
db_add_field($ret, 'workflows', 'options', array('type' => 'text', 'size' => 'big', 'not null' => FALSE)); |
| 388 |
// Seed existing workflows with the behavior of showing the comment field. |
// Seed existing workflows with the behavior of showing the comment field. |
| 389 |
$default = serialize(array('comment_log_node' => 1, 'comment_log_tab' => 1)); |
$default = serialize(array('comment_log_node' => 1, 'comment_log_tab' => 1)); |
| 390 |
$query_result = db_query("UPDATE {workflows} SET options = '%s'", $default); |
$query_result = db_query("UPDATE {workflows} SET options = '%s'", $default); |