diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-03-28 11:45:11 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-03-28 11:45:11 +0000 |
commit | a08c9696694cee8a41effd7cb6527f9d1e9ca5e0 (patch) | |
tree | 890d8ac23afb9c5d25c42c2ac18a1feffad8a388 /includes/database/pgsql | |
parent | 00ecc0a208cf498c7e5e2e734364f62509f1be6e (diff) | |
download | brdo-a08c9696694cee8a41effd7cb6527f9d1e9ca5e0.tar.gz brdo-a08c9696694cee8a41effd7cb6527f9d1e9ca5e0.tar.bz2 |
- Patch #728338 by sun, Crell: standardize on 'field' in function names. 'It has to get worse before it can get better.'
Diffstat (limited to 'includes/database/pgsql')
-rw-r--r-- | includes/database/pgsql/schema.inc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/database/pgsql/schema.inc b/includes/database/pgsql/schema.inc index 1306bbd3a..fcff331fb 100644 --- a/includes/database/pgsql/schema.inc +++ b/includes/database/pgsql/schema.inc @@ -313,7 +313,7 @@ class DatabaseSchema_pgsql extends DatabaseSchema { if (!$this->tableExists($table)) { throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot add field %table.%field: table doesn't exist.", array('%field' => $field, '%table' => $table))); } - if ($this->columnExists($table, $field)) { + if ($this->fieldExists($table, $field)) { throw new DatabaseSchemaObjectExistsException(t("Cannot add field %table.%field: field already exists.", array('%field' => $field, '%table' => $table))); } @@ -343,7 +343,7 @@ class DatabaseSchema_pgsql extends DatabaseSchema { } public function dropField($table, $field) { - if (!$this->columnExists($table, $field)) { + if (!$this->fieldExists($table, $field)) { return FALSE; } @@ -352,7 +352,7 @@ class DatabaseSchema_pgsql extends DatabaseSchema { } public function fieldSetDefault($table, $field, $default) { - if (!$this->columnExists($table, $field)) { + if (!$this->fieldExists($table, $field)) { throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot set default value of field %table.%field: field doesn't exist.", array('%table' => $table, '%field' => $field))); } @@ -367,7 +367,7 @@ class DatabaseSchema_pgsql extends DatabaseSchema { } public function fieldSetNoDefault($table, $field) { - if (!$this->columnExists($table, $field)) { + if (!$this->fieldExists($table, $field)) { throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot remove default value of field %table.%field: field doesn't exist.", array('%table' => $table, '%field' => $field))); } @@ -457,10 +457,10 @@ class DatabaseSchema_pgsql extends DatabaseSchema { } public function changeField($table, $field, $field_new, $spec, $new_keys = array()) { - if (!$this->columnExists($table, $field)) { + if (!$this->fieldExists($table, $field)) { throw new DatabaseSchemaObjectDoesNotExistException(t("Cannot change the definition of field %table.%name: field doesn't exist.", array('%table' => $table, '%name' => $field))); } - if (($field != $field_new) && $this->columnExists($table, $field_new)) { + if (($field != $field_new) && $this->fieldExists($table, $field_new)) { throw new DatabaseSchemaObjectExistsException(t("Cannot rename field %table.%name to %name_new: target field already exists.", array('%table' => $table, '%name' => $field, '%name_new' => $field_new))); } |