summaryrefslogtreecommitdiffstatshomepage
path: root/includes/database/mysql/schema.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/database/mysql/schema.inc')
-rw-r--r--includes/database/mysql/schema.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/database/mysql/schema.inc b/includes/database/mysql/schema.inc
index 2b9ca71cab9..9af75fd50ea 100644
--- a/includes/database/mysql/schema.inc
+++ b/includes/database/mysql/schema.inc
@@ -289,7 +289,7 @@ class DatabaseSchema_mysql 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)));
}
@@ -316,7 +316,7 @@ class DatabaseSchema_mysql extends DatabaseSchema {
}
public function dropField($table, $field) {
- if (!$this->columnExists($table, $field)) {
+ if (!$this->fieldExists($table, $field)) {
return FALSE;
}
@@ -325,7 +325,7 @@ class DatabaseSchema_mysql 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)));
}
@@ -340,7 +340,7 @@ class DatabaseSchema_mysql 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)));
}
@@ -415,10 +415,10 @@ class DatabaseSchema_mysql extends DatabaseSchema {
}
public function changeField($table, $field, $field_new, $spec, $keys_new = 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)));
}