function uc_file_update_6000 in Ubercart 6.2
File
- uc_file/
uc_file.install, line 224 - Install, update and uninstall functions for the uc_file module.
Code
function uc_file_update_6000() {
$ret = array();
db_drop_index($ret, 'uc_files', 'fid');
db_change_field($ret, 'uc_files', 'fid', 'fid', array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
), array(
'primary key' => array(
'fid',
),
));
db_drop_index($ret, 'uc_file_products', 'pfid');
db_drop_index($ret, 'uc_file_products', 'fid');
db_change_field($ret, 'uc_file_products', 'pfid', 'pfid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
), array(
'indexes' => array(
'pfid' => array(
'pfid',
),
),
));
db_change_field($ret, 'uc_file_products', 'fid', 'fid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
), array(
'indexes' => array(
'fid' => array(
'fid',
),
),
));
db_change_field($ret, 'uc_file_products', 'shippable', 'shippable', array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
));
db_drop_index($ret, 'uc_file_users', 'fid');
db_drop_index($ret, 'uc_file_users', 'uid');
db_change_field($ret, 'uc_file_users', 'fid', 'fid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
), array(
'indexes' => array(
'fid' => array(
'fid',
),
),
));
db_change_field($ret, 'uc_file_users', 'uid', 'uid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
), array(
'indexes' => array(
'uid' => array(
'uid',
),
),
));
db_change_field($ret, 'uc_file_users', 'pfid', 'pfid', array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
));
return $ret;
}