- drupal
- drupal6 database.mysql-common.inc
- drupal6
- drupal7 database.inc
| Versionen | |
| drupal6 – drupal7 |
db_field_set_no_default(&$ret, $table, $field) |
Set a field to have no default value.
Übergabeparameter
$ret
Array to which query results will be added.
$table
The table to be altered.
$field
The field to be altered.
Verwandte Themen
- Schema API
- A Drupal schema definition is an array structure representing one or
more tables and their related keys and indexes. A schema is defined by
hook_schema(), which usually lives in a modulename.install file.
- system_update_6019 in 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.
Code
includes/database.pgsql.inc, line 738
<?php
function db_field_set_no_default(&$ret, $table, $field) {
$ret[] = update_sql('ALTER TABLE {' . $table . '} ALTER COLUMN ' . $field . ' DROP DEFAULT');
}
?>
Kommentare
Kommentar hinzufügen