| 15 |
$schema['uc_countries'] = array( |
$schema['uc_countries'] = array( |
| 16 |
'fields' => array( |
'fields' => array( |
| 17 |
'country_id' => array( |
'country_id' => array( |
| 18 |
'type' => 'serial', |
'type' => 'int', |
| 19 |
'unsigned' => TRUE, |
'unsigned' => TRUE, |
| 20 |
'not null' => TRUE, |
'not null' => TRUE, |
| 21 |
), |
), |
| 301 |
return $ret; |
return $ret; |
| 302 |
} |
} |
| 303 |
|
|
| 304 |
|
/** |
| 305 |
|
* Remove auto-increment from uc_countries.country_id. |
| 306 |
|
*/ |
| 307 |
|
function uc_store_update_6005() { |
| 308 |
|
$ret = array(); |
| 309 |
|
|
| 310 |
|
switch ($GLOBALS['db_type']) { |
| 311 |
|
case 'mysql': |
| 312 |
|
case 'mysqli': |
| 313 |
|
db_change_field($ret, 'uc_countries', 'country_id', 'country_id', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE)); |
| 314 |
|
break; |
| 315 |
|
case 'pgsql': |
| 316 |
|
db_drop_primary_key($ret, 'uc_countries'); |
| 317 |
|
db_change_field($ret, 'uc_countries', 'country_id', 'country_id', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array('country_id'))); |
| 318 |
|
break; |
| 319 |
|
} |
| 320 |
|
|
| 321 |
|
return $ret; |
| 322 |
|
} |
| 323 |
|
|