function db_change_field
Same name in this branch
- 6.x drupal-6.x/includes/database.pgsql.inc \db_change_field()
- 6.x drupal-6.x/includes/database.mysql-common.inc \db_change_field()
Same name and namespace in other branches
- 7.x drupal-7.x/includes/database/database.inc \db_change_field()
Related topics
13 calls to db_change_field()
- dblog_update_6000 in drupal-6.x/modules/dblog/dblog.install
- Allow longer referrers.
- db_add_field in drupal-6.x/includes/database.mysql-common.inc
- Add a new field to a table.
- statistics_update_6000 in drupal-6.x/modules/statistics/statistics.install
- Allow longer referrers.
- system_update_6002 in drupal-6.x/modules/system/system.install
- Increase the maximum length of variable names from 48 to 128.
- system_update_6019 in drupal-6.x/modules/system/system.install
- Reconcile small differences in the previous, manually created mysql
and pgsql schemas so they are the same and can be represented by a
single schema structure.
... See full list
Archivo
- drupal-6.x/includes/database.mysql-common.inc, line 523
- Functions shared between mysql and mysqli database engines.
Código
function db_change_field(&$ret, $table, $field, $field_new, $spec, $keys_new = array()) {
$sql = 'ALTER TABLE {' . $table . '} CHANGE `' . $field . '` ' . _db_create_field_sql($field_new, _db_process_field($spec));
if (count($keys_new)) {
$sql .= ', ADD ' . implode(', ADD ', _db_create_keys_sql($keys_new));
}
$ret[] = update_sql($sql);
}