function uc_roles_update_6000 in Ubercart 6.2
File
- uc_roles/
uc_roles.install, line 181 - Install, update and uninstall functions for the uc_roles module.
Code
function uc_roles_update_6000() {
$ret = array();
db_drop_index($ret, 'uc_roles_products', 'pfid');
db_drop_index($ret, 'uc_roles_products', 'nid');
db_drop_index($ret, 'uc_roles_products', 'rid');
db_change_field($ret, 'uc_roles_products', 'pfid', 'pfid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
), array(
'indexes' => array(
'pfid' => array(
'pfid',
),
),
));
db_change_field($ret, 'uc_roles_products', 'nid', 'nid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
), array(
'indexes' => array(
'nid' => array(
'nid',
),
),
));
db_change_field($ret, 'uc_roles_products', 'rid', 'rid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
), array(
'indexes' => array(
'rid' => array(
'rid',
),
),
));
db_drop_index($ret, 'uc_roles_expirations', 'uid');
db_drop_index($ret, 'uc_roles_expirations', 'rid');
db_change_field($ret, 'uc_roles_expirations', 'uid', 'uid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
), array(
'indexes' => array(
'uid' => array(
'uid',
),
),
));
db_change_field($ret, 'uc_roles_expirations', 'rid', 'rid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
), array(
'indexes' => array(
'rid' => array(
'rid',
),
),
));
return $ret;
}